Recall that the bracket sequence is considered regular if it is possible to insert symbols '+' and '1' into it so that the result is a correct arithmetic expression. For example, a sequence "(()())" is regular, because we can get correct arithmetic expression insering symbols '+' and '1': "((1+1)+(1+1))". Also the following sequences are regular: "()()()", "(())" and "()". The following sequences are not regular bracket sequences: ")(", "(()" and "())(()".

In this problem you are given two integers n and k. Your task is to construct a regular bracket sequence consisting of round brackets with length 2·n with total sum of nesting of all opening brackets equals to exactly k. The nesting of a single opening bracket equals to the number of pairs of brackets in which current opening bracket is embedded.

For example, in the sequence "()(())" the nesting of first opening bracket equals to 0, the nesting of the second opening bracket equals to 0 and the nesting of the third opening bracket equal to 1. So the total sum of nestings equals to 1.

Input

The first line contains two integers n and k (1 ≤ n ≤ 3·105, 0 ≤ k ≤ 1018) — the number of opening brackets and needed total nesting.

Output

Print the required regular bracket sequence consisting of round brackets.

If there is no solution print "Impossible" (without quotes).

Examples

Input

3 1


Output

()(())

Input

4 6


Output

(((())))

Input

2 5


Output

Impossible

Note

The first example is examined in the statement.

In the second example the answer is "(((())))". The nesting of the first opening bracket is 0, the nesting of the second is 1, the nesting of the third is 2, the nesting of fourth is 3. So the total sum of nestings equals to 0 + 1 + 2 + 3 = 6.

In the third it is impossible to construct a regular bracket sequence, because the maximum possible total sum of nestings for two opening brackets equals to 1. This total sum of nestings is obtained for the sequence "(())".

Difficulty: MEDIUM_HARD
Tags: Constructive algorithms

Starter code:

Solutions:
import os
import sys
from io import BytesIO, IOBase
from collections import Counter
from bisect import *
from math import gcd
from itertools import permutations, combinations
from math import sqrt, ceil, floor

def main():
	(n, k) = map(int, input().split())
	z = floor((-1 + sqrt(1 + 8 * k)) / 2)
	f = int(z * (z + 1) // 2 != k)
	if z + f > n - 1:
		print('Impossible')
	elif f:
		y = (z + 1) * (z + 2) // 2 - k
		print('(' * (z + 1) + ')' * y + '(' + ')' * (z + 2 - y) + '()' * (n - (z + 2)))
	else:
		print('(' * (z + 1) + ')' * (z + 1) + '()' * (n - 1 - z))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(n, k) = map(int, input().split())
if n * (n - 1) // 2 < k:
	print('Impossible')
	exit()
i = 0
d = 0
sum = 0
s = '('
while 1:
	if sum + d + 1 <= k:
		s += '('
		d += 1
		sum += d
	else:
		s += ')'
		while sum + d > k:
			d -= 1
			s += ')'
		if d == 0:
			break
		else:
			s += '('
			sum += d
ans = s
if len(ans) > n * 2:
	print('Impossible')
else:
	print(ans + ''.join(['()' for _ in range(n - len(ans) // 2)]))


(n, k) = map(int, input().split())
s = int((1 + 8 * k) ** 0.5) + 1 >> 1
k -= s * s - s >> 1
n -= s
if n < bool(k):
	print('Impossible')
	exit()
t = '(' * s + ')' * s
if k:
	t = t[:k] + '()' + t[k:]
	n -= 1
print(t + '()' * n)


from math import *
(n, k) = map(int, input().split())
if n * (n - 1) // 2 < k:
	print('Impossible')
else:
	li = []
	temp = int((-1 + sqrt(8 * k + 1)) // 2)
	k -= temp * (temp + 1) // 2
	li += [temp]
	for i in range(temp):
		cur = temp - i
		if cur <= k and cur > 0:
			li += [cur] * (k // cur)
			k -= k // cur * cur
		if k == 0 or cur == 0:
			break
	li.reverse()
	num = li[0]
	ans = ''
	for i in range(num + 1):
		ans += '('
	n -= num + 1
	ans += ')'
	for i in range(1, len(li)):
		num = li[i] - li[i - 1] + 1
		for j in range(num):
			ans += '('
		n -= num
		ans += ')'
	ans += ')' * li[-1]
	if n < 0 or k > 0:
		print('Impossible')
	else:
		for i in range(n):
			ans += '()'
		print(ans)


from math import ceil
(n, k) = map(int, input().split())
if n * (n - 1) // 2 < k:
	print('Impossible')
	exit()
x = ceil(((8 * k + 1) ** 0.5 + 1) / 2)
p = x * (x - 1) // 2 - k
print('()' * (n - x) + '(' * (x - 1) + ')' * p + '()' + ')' * (x - p - 1))


(n, k) = map(int, input().split())
(k_now, level, n_now) = (0, 0, 0)
ans = list()
if k > n * (n - 1) / 2:
	print('Impossible')
else:
	while n_now < 2 * n:
		if k_now + level <= k:
			ans.append('(')
			k_now += level
			level += 1
		else:
			ans.append(')')
			level -= 1
		n_now += 1
	print(*ans, sep='')


from sys import exit
from math import sqrt
(n, k) = map(int, input().split())
if n * (n - 1) // 2 < k:
	print('Impossible')
else:
	h = int((1 + sqrt(8 * k + 1)) / 2)
	c = n
	for _ in range(h):
		print('(', end='')
	c -= h
	k -= h * (h - 1) // 2
	while h != 0:
		m = k // h
		for _ in range(m):
			print('()', end='')
		c -= m
		k -= h * m
		h -= 1
		print(')', end='')
	while c > 0:
		print('()', end='')
		c -= 1


import sys
input = sys.stdin.buffer.readline

def ints():
	return map(int, input().split())
(n, k) = ints()
if k > (n - 1) * n // 2:
	print('Impossible')
	exit(0)
sum = 0
ans = ''
for i in range(n + 1):
	if sum + i > k:
		ans += '(' * i
		ans += ')' * (i - (k - sum))
		if i != n:
			ans += '('
			ans += ')' * (k - sum + 1)
			ans += '()' * (n - i - 1)
		else:
			ans += ')' * (k - sum)
		break
	sum += i
print(ans)


ch = input()
l = ch.split(' ')
n = int(l[0])
k = int(l[1])
l1 = '('
l2 = ')'
l3 = '()'
s = 0
mi = 0
ch = ''
from math import sqrt
q = int(sqrt(2 * k))
while k >= q * (q - 1) / 2:
	q = q + 1
q = q - 1
d = int(k - q * (q - 1) / 2)
mi = q
i = 0
if d != 0:
	mi = q + 1
	i = 1
if n < mi:
	print('Impossible')
else:
	c = n - mi
	print(c * l3 + d * l1 + i * l3 + (q - d) * l1 + q * l2)


(n, m) = map(int, input().split())
if m > n * (n - 1) // 2:
	print('Impossible')
else:
	ans = []
	cur = 0
	acc = 0
	for i in range(n):
		while cur + acc > m:
			ans.append(')')
			acc -= 1
		ans.append('(')
		cur += acc
		acc += 1
	left_cnt = 0
	for i in ans:
		if i == '(':
			left_cnt += 1
		else:
			left_cnt -= 1
	for i in range(left_cnt):
		ans.append(')')
	print(''.join(ans))


(n, k) = map(int, input().split())
(k_now, level, n_now) = (0, 0, 0)
ans = str()
if k > n * (n - 1) / 2:
	print('Impossible')
else:
	while n_now < 2 * n:
		if k_now + level <= k:
			ans += '('
			k_now += level
			level += 1
		else:
			ans += ')'
			level -= 1
		n_now += 1
	print(ans)


import math
(n, k) = map(int, input().split())
if (n - 1) * n // 2 < k:
	print('Impossible')
else:
	necessary_n = math.ceil((1 + math.sqrt(1 + 8 * k)) / 2)
	residual_value = (necessary_n - 1) * necessary_n // 2 - k
	print('()' * (n - necessary_n) + '(' * (necessary_n - 1) + ')' * residual_value + '()' + ')' * (necessary_n - 1 - residual_value))


def some_random_function():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)

def some_random_function5():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)
import os, sys
from io import BytesIO, IOBase
from bisect import bisect_right

def main():
	(n, k) = map(int, input().split())
	if n * (n - 1) // 2 < k:
		print('Impossible')
		exit()
	nest = [0]
	for _ in range(n):
		nest.append(nest[-1] + len(nest))
	x = bisect_right(nest, k) - 1
	y = k - nest[x]
	if y:
		val = ['(' * x + '()' + ')' * (x - y) + '()' + ')' * y]
	else:
		val = ['(' * x + '()' + ')' * x]
	val.append('()' * (n - len(val[0]) // 2))
	print(''.join(val))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def some_random_function1():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)

def some_random_function2():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)

def some_random_function3():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)

def some_random_function4():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)

def some_random_function6():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)

def some_random_function7():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)

def some_random_function8():
	x = 10
	x *= 100
	i_dont_know = x
	why_am_i_writing_this = x * x
	print(i_dont_know)
	print(why_am_i_writing_this)
main()


def step(n, k):
	count = min(n, int((1 + (1 + 8 * k) ** 0.5) / 2))
	return count

def nest(n, k):
	accum = ''
	count = step(n, k)
	leftover = int(k - (count - 1) * count / 2)
	n -= count
	if leftover == 0:
		accum += count * '('
		accum += count * ')'
		return accum + n * '()'
	if n == 0:
		return 'Impossible'
	pos = count - leftover
	accum += count * '('
	accum += pos * ')'
	accum += '()'
	accum += (count - pos) * ')'
	n -= 1
	accum += n * '()'
	return accum
(N, K) = [int(x) for x in input().split()]
print(nest(N, K))