The chef is trying to decode some pattern problems, Chef wants your help to code it. Chef has one number K to form a new pattern. Help the chef to code this pattern problem.

-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- Each test case contains a single line of input, one integer $K$. 

-----Output:-----
For each test case, output as the pattern.

-----Constraints-----
- $1 \leq T \leq 100$
- $1 \leq K \leq 100$

-----Sample Input:-----
4
1
2
3
4

-----Sample Output:-----
1
10
10
101
101
101
1010
1010
1010
1010

-----EXPLANATION:-----
No need, else pattern can be decode easily.

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
for _ in range(int(input())):
	n = int(input())
	num = ''
	val = 1
	for i in range(n):
		num += str(val)
		if val == 1:
			val = 0
		else:
			val = 1
	for i in range(n):
		print(num)


for _ in range(0, int(input())):
	a = int(input())
	for i in range(0, a):
		for j in range(0, a):
			if j % 2 == 0:
				print(1, end='')
			else:
				print(0, end='')
		print()


t = int(input())
for t in range(t):
	n = int(input())
	for i in range(0, n):
		for j in range(0, n):
			if j % 2 == 0:
				print(1, end='')
			else:
				print(0, end='')
		print()


for i in range(int(input())):
	k = int(input())
	m1 = k
	c = 1
	z = 0
	count = 0
	while k > 1:
		if z % 2 == 0:
			c = c * 10
		else:
			c = c * 10 + 1
		k -= 1
		z += 1
	for j in range(m1):
		print(c)


from sys import *
input = stdin.readline
t = int(input())
for _ in range(t):
	k = int(input())
	l = [1 for _ in range(k)]
	for i in range(1, k):
		if l[i - 1] == 0:
			l[i] = 1
		else:
			l[i] = 0
	ans = ''.join([str(x) for x in l])
	for i in range(k):
		print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	s = ''
	for i in range(1, n + 1):
		if i % 2 != 0:
			s += '1'
		else:
			s += '0'
	for i in range(1, n + 1):
		print(s)


try:
	for i in range(int(input())):
		n = int(input())
		for j in range(1, n + 1):
			s = 1
			for k in range(1, n + 1):
				print(s, end='')
				s = 1 - s
			print('\r')
except Exception:
	pass


for _ in range(int(input())):
	k = int(input())
	for i in range(k):
		x = 1
		for j in range(k):
			print(x, end='')
			if x == 1:
				x = 0
			else:
				x = 1
		print()


def solve(n):
	for i in range(1, n + 1):
		j = 1
		for k in range(1, n + 1):
			print(j, end='')
			if j == 1:
				j = 0
			else:
				j = 1
		print()
for _ in range(int(input())):
	n = int(input())
	solve(n)


t = int(input())
for i in range(t):
	k = int(input())
	ini = ''.join([str(i % 2) for i in range(1, k + 1)])
	for j in range(0, k):
		print(ini)


try:
	tc = int(input())
	for _ in range(tc):
		n = int(input())
		a = 0
		st = ''
		for i in range(n):
			if a % 2 == 1:
				st += '0'
			else:
				st += '1'
			a += 1
		for j in range(n):
			print(st)
except:
	pass


def fk(s: str):
	s = int(s)
	res = ''
	ini = 1
	for i in range(s):
		res += str(ini)
		ini = 1 - ini
	for i in range(s):
		print(res)
n = eval(input())
n = int(n)
t = [fk(eval(input())) for i in range(n)]


try:

	def solve(n):
		res = ''
		for i in range(n):
			if i % 2 == 0:
				res += '1'
			else:
				res += '0'
		return res
	t = int(input())
	for _ in range(t):
		n = int(input())
		z = solve(n)
		for i in range(n):
			print(z)
except EOFError:
	pass


for _ in range(int(input())):
	k = int(input())
	s = ''
	count = 1
	for i in range(k):
		for j in range(k):
			s += str(count)
			if count == 1:
				count = 0
			else:
				count = 1
		print(s)
		s = ''
		count = 1