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 10$
- $1 \leq K \leq 10$

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

-----Sample Output:-----
0 
0 
1 1 
0 
1 1 
2 3 5 
0 
1 1 
2 3 5 
8 13 21 34  

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

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
def solve(n):
	if n == 1:
		print('0')
		return
	l = 3
	p1 = 1
	p2 = 1
	print('0')
	print('1 1')
	for i in range(n - 2):
		x = ''
		for i in range(l):
			nt = p1 + p2
			c = p2
			p2 = nt
			p1 = c
			x += str(nt)
			if i != l - 1:
				x += ' '
		print(x)
		l += 1

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		solve(n)
main()


for _ in range(int(input())):
	K = int(input())
	if K == 1:
		print(0)
	elif K == 2:
		print(0)
		print(*[1, 1])
	else:
		print(0)
		print(*[1, 1])
		l = 1
		c = 1
		for i in range(2, K):
			A = []
			for j in range(i + 1):
				A.append(l + c)
				l = c
				c = A[-1]
			print(*A)