A sequence of square brackets is regular if by inserting symbols "+" and "1" into it, you can get a regular mathematical expression from it. For example, sequences "[[]][]", "[]" and "[[][[]]]" — are regular, at the same time "][", "[[]" and "[[]]][" — are irregular. Draw the given sequence using a minimalistic pseudographics in the strip of the lowest possible height — use symbols '+', '-' and '|'. For example, the sequence "[[][]][]" should be represented as: +-        -++- -+    |+- -++- -+||   |||   ||   |||   ||+- -++- -+||   |+-        -++- -+Each bracket should be represented with the hepl of one or more symbols '|' (the vertical part) and symbols '+' and '-' as on the example which is given above.Brackets should be drawn without spaces one by one, only dividing pairs of consecutive pairwise brackets with a single-space bar (so that the two brackets do not visually merge into one symbol). The image should have the minimum possible height. The enclosed bracket is always smaller than the surrounding bracket, but each bracket separately strives to maximize the height of the image. So the pair of final brackets in the example above occupies the entire height of the image.Study carefully the examples below, they adequately explain the condition of the problem. Pay attention that in this problem the answer (the image) is unique.

The first line contains an even integer n (2 ≤ n ≤ 100) — the length of the sequence of brackets. The second line contains the sequence of brackets — these are n symbols "[" and "]". It is guaranteed that the given sequence of brackets is regular.

Print the drawn bracket sequence in the format which is given in the condition. Don't print extra (unnecessary) spaces.

var n = +(readline().trim());
var a = readline().trim();
var level = 0;
var levels = [];
var maxlevel = 0;
for(var i = 0; i < n; i++){
    if(a[i] == "["){
        levels[i] = level;
        if(level > maxlevel) maxlevel = level;
        level++;
    }else{
        level--;
        levels[i] = level;
    }
}

var s = [];
var cells = maxlevel * 2 + 3;
var c = 0;
for(var i = 0; i < n; i++){
    var ns = [];

    if(a[i] == "]" && a[i - 1] == "["){
        var ns = [];
        for(var j = 0; j < cells; j++){
            if(j == levels[i]){
                ns[j] = "-";
            }else if(j == maxlevel * 2 + 2 - levels[i]){
                ns[j] = "-";
            }else{
                ns[j] = " ";
            }
        }
        s[c] = ns.join("");
        c++;
    }

    var ns = [];
    var pluses = [];
    var opened = false;
    for(var j = 0; j < cells; j++){
        if(j == levels[i]){
            ns[j] = "+";
            opened = true;
        }else if(j == maxlevel * 2 + 2 - levels[i]){
            ns[j] = "+";
            opened = false;
        }else if(opened){
            ns[j] = "|";
        }else if(i > 0 && a[i - 1] == "[" && (j == levels[i - 1] || j == maxlevel * 2 + 2 - levels[i - 1])){
            ns[j] = "-";
        }else if(i > 0 && a[i + 1] == "]" && (j == levels[i + 1] || j == maxlevel * 2 + 2 - levels[i + 1])){
            ns[j] = "-";
        }else{
            ns[j] = " ";
        }
    }
    s[c] = ns.join("");
    c++;

    if(a[i] == "[" && a[i + 1] == "]"){
        var ns = [];
        for(var j = 0; j < cells; j++){
            if(j == levels[i]){
                ns[j] = "-";
            }else if(j == maxlevel * 2 + 2 - levels[i]){
                ns[j] = "-";
            }else{
                ns[j] = " ";
            }
        }
        s[c] = ns.join("");
        c++;
        for(var j = 0; j < cells; j++){
            ns[j] = " ";
        }
        s[c] = ns.join("");
        c++;
    }
}

for(var i = 0; i < cells; i++){
    var sd = "";
    for(var j = 0; j < c; j++){
        sd += s[j][i];
    }
    print(sd);
}

readline();
var brackets = readline().split(""),
	maxDeep = getMaxDeep(brackets),
	renderDeep = 1 + maxDeep*2,
	matrix;

function getMaxDeep(brackets) {
	var deep = 0;
	return brackets.reduce(function (maxDeep, bracket) {
		bracket === "[" ? ++deep : --deep;
		return deep > maxDeep ? deep : maxDeep;
	}, 1);
}

function getMatrix(brackets) {
	var matrix = [],
		pointer = 0,
		deep = 1,
		i;

	for(i = 0; i < renderDeep; i++) {
		matrix[i] = [];
	}

	brackets.forEach(function (bracket, index) {
		var height = renderDeep - (deep - 1)*2,
			top = (renderDeep - height)/2,
			bottom = height + top - 1;

		if(bracket === "["){
			if(brackets[index - 1] !== "[") createLine(pointer);
			createLine(pointer + 1)	;
			createLine(pointer + 2);
		} else {
			if(brackets[index - 1] !== "]") createLine(pointer);
			createLine(pointer + 1);
		}

		matrix.forEach(function (line, index) {
			if(index === top || index === bottom) {
				if(bracket === "[") {
					line[pointer] = "+";
					line[pointer + 1] = "-";
				} else {
					line[pointer] = "-";
					line[pointer + 1] = "+";
				}
			} else if(index > top && index < bottom){
				if(bracket === "[") {
					line[pointer] = "|";
				} else {
					line[pointer + 1] = "|";
				}
			}
		});

		if(bracket === "[") {
			if(brackets[index + 1] === "[") {
				pointer += 1;
				deep++;
			} else {
				pointer += 3;
			}
		} else {
			if(brackets[index + 1] === "]") {
				pointer += 1;
				deep--;
			} else {
				pointer += 2;
			}
		}
	});

	function createLine(pointer) {
		matrix.forEach(function (line) {
			line[pointer] = " ";
		});
	}

	return matrix;
}

function printMatrix(matrix) {
	matrix.forEach(function (line) {
		print(line.join(""));
	});
}

matrix = getMatrix(brackets, maxDeep);
printMatrix(matrix);

readline() // count

var str = readline();

var deep = 0, maxDeep = 0;
var data = [];

for (var i = 0, l = str.length; i < l; ++i) {
    if (str[i] == "[") {
        ++deep;
        if (maxDeep < deep) {
            maxDeep = deep;
        }
    } else {
        --deep;
    }
}

var line = [], currentDeep = maxDeep, width = 0;
for (var i = 0, l = str.length; i < l; ++i) {
    if (str[i] == "[") {
        line.push({type: 1, depth: currentDeep, under: str[i - 1] == "["});
        --currentDeep;
    } else {
        if (str[i - 1] == "[") {
            width += 3;
            line.push({type: 2, depth: currentDeep});
        }

        line.push({type: 1, depth: ++currentDeep, under: str[i + 1] == "]"});
    }
    ++width;
}

var data = new Array(maxDeep * 2 + 1),
    middle = Math.floor(data.length / 2),
    x = 0;

for (var i = 0, l = data.length; i < l; ++i) {
    data[i] = new Array(width);
    for (var j = 0, k = width; j < k; ++j) {
        data[i][j] = " ";
    }
};

for (var i = 0, l = line.length; i < l; ++i) {
    switch (line[i].type) {
        case 2:
            data[middle - line[i].depth - 1][x] = "-";
            data[middle + line[i].depth + 1][x] = "-";
            x += 2;
            data[middle - line[i].depth - 1][x] = "-";
            data[middle + line[i].depth + 1][x] = "-";
            x++;
            break;

        case 1:
            if (line[i].under) {
                data[middle - line[i].depth - 1][x] = "-";
            }
            data[middle - line[i].depth][x] = "+";
            for (var y = middle - line[i].depth + 1; y < middle + line[i].depth; ++y) {
                data[y][x] = "|";
            }
            data[middle + line[i].depth][x] = "+";
            if (line[i].under) {
                data[middle + line[i].depth + 1][x] = "-";
            }
            x++;
            break;
    }
}

for (var r = 0, l = data.length; r < l; ++r) {
    print(data[r].join(""));
}


Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept losing. Having returned to the castle, Twilight Sparkle became interested in the dice that were used in the game.The dice has m faces: the first face of the dice contains a dot, the second one contains two dots, and so on, the m-th face contains m dots. Twilight Sparkle is sure that when the dice is tossed, each face appears with probability . Also she knows that each toss is independent from others. Help her to calculate the expected maximum number of dots she could get after tossing the dice n times.

A single line contains two integers m and n (1 ≤ m, n ≤ 105).

Output a single real number corresponding to the expected maximum. The answer will be considered correct if its relative or absolute error doesn't exceed 10  - 4.

NoteConsider the third test example. If you've made two tosses:  You can get 1 in the first toss, and 2 in the second. Maximum equals to 2.  You can get 1 in the first toss, and 1 in the second. Maximum equals to 1.  You can get 2 in the first toss, and 1 in the second. Maximum equals to 2.  You can get 2 in the first toss, and 2 in the second. Maximum equals to 2. The probability of each outcome is 0.25, that is expectation equals to: You can read about expectation using the following link: http://en.wikipedia.org/wiki/Expected_value

;(function () {

    print(function (m, n) {
        var s = m;
        for (var i = m - 1; i >= 1; i--) {
            s -= Math.pow(i / m, n);
        }

        return s;
    }.apply(null, readline().split(' ').map(Number)));

}.call(this));

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i], 10);
	};
	return tokens;
}

function main() {
	var data = tokenizeIntegers(readline()),
		m = data[0], n = data[1],
		mean = m;
	for (var k = 1; k < m; ++k) {
		mean -= Math.pow(k/m, n);
	}
	print(mean);
}

main();

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i], 10);
	};
	return tokens;
}

function main() {
	var data = tokenizeIntegers(readline()),
		m = data[0], n = data[1],
		prev = 1.0, mean = 0.0;
	for (var k = m; k >= 1; --k) {
		var curr = Math.pow((k-1)/m, n);
		mean += (prev-curr)*k;
		prev = curr;
	}
	print(mean);
}

main();

function read_int() {
    return readline().split(" ").map(function (x) { return parseInt(x); });
}
function read_float() {
    return readline().split(" ").map(function (x) { return parseFloat(x); });
}
function read() {
    return readline().split(' ');
}
var x=read();
var m=x[0]*1.0;
var n=x[1]*1.0;
var ans=m;
for (var i=1;i<m;i++){
    ans=ans-Math.pow(i*1.0/m,n);
}
print(ans);

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i], 10);
	};
	return tokens;
}

function main() {
	var data = tokenizeIntegers(readline()),
		m = data[0], n = data[1],
		trialNum = 0.5*Math.pow(10, 8)/n,
		total = 0;
	for (var t = 0; t < trialNum; ++t) {
		var max = 0;
		for (var i = 0; i < n; ++i) {
			max = Math.max(max, 1 + Math.floor(Math.random()*m));
		}
		total += max;
	}
	print(total / trialNum);
}

main();