You have been blessed as a child of Omkar. To express your gratitude, please solve this problem for Omkar!

An array a of length n is called complete if all elements are positive and don't exceed 1000, and for all indices x,y,z (1 ≤ x,y,z ≤ n), a_{x}+a_{y} ≠ a_{z} (not necessarily distinct).

You are given one integer n. Please find any complete array of length n. It is guaranteed that under given constraints such array exists.

Input

Each test contains multiple test cases. The first line contains t (1 ≤ t ≤ 1000) — the number of test cases. Description of the test cases follows.

The only line of each test case contains one integer n (1 ≤ n ≤ 1000).

It is guaranteed that the sum of n over all test cases does not exceed 1000.

Output

For each test case, print a complete array on a single line. All elements have to be integers between 1 and 1000 and for all indices x,y,z (1 ≤ x,y,z ≤ n) (not necessarily distinct), a_{x}+a_{y} ≠ a_{z} must hold.

If multiple solutions exist, you may print any.

Example

Input


2
5
4


Output


1 5 3 77 12
384 384 44 44

Note

It can be shown that the outputs above are valid for each test case. For example, 44+44 ≠ 384.

Below are some examples of arrays that are NOT complete for the 1st test case:

[1,2,3,4,5] 

Notice that a_{1}+a_{2} = a_{3}.

[1,3000,1,300,1] 

Notice that a_{2} = 3000 > 1000.

Difficulty: EASY

Solutions:
t = int(input())
for i in range(0, t):
	n = int(input())
	L = [1] * n
	print(*L)


t = int(input())
for i in range(t):
	n = int(input())
	l = [1] * n
	print(*l)


for t in range(int(input())):
	print(*[1] * int(input()))


for _ in range(int(input())):
	n = int(input())
	print(n * '1 ')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
T = inp()
tests = []
for _ in range(T):
	tests.append(inp())
for n in tests:
	for i in range(n):
		print(1, end=' ')
	print()


for lo in range(int(input())):
	n = int(input())
	ls = [1] * n
	print(*ls)


tc = int(input())
for x in range(tc):
	n = int(input())
	print('1 ' * n)


t = int(input())
Maxn = 210000
while t > 0:
	t -= 1
	n = int(input())
	for i in range(0, n):
		print('1', end=' ')
	print('')


qt = int(input())
for ki in range(qt):
	n = int(input())
	for i in range(n):
		print('1 ', end='')
	print()


for _ in range(int(input())):
	n = int(input())
	x = ['1']
	if n == 1:
		print(1)
	else:
		x = '1 ' * n
		print(x[:-1])


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	ans = ['1' for i in range(n)]
	print(' '.join(ans))


testcases = int(input())
for testcase in range(testcases):
	n = int(input())
	arr = ['1'] * n
	print(' '.join(arr))


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		print(*[1] * N)
main()


t = int(input())
a = [1 for x in range(1000)]
for _ in range(t):
	n = int(input())
	print(*a[:n])


t = int(input())
while t:
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()
	t = t - 1


t = input()
for opo in range(int(t)):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	ans = [1] * n
	for i in ans:
		print(i, end=' ')
	print()


import math

def mi():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return input().split()
t = ii()
for _ in range(t):
	n = ii()
	for i in range(n):
		print(1, end=' ')
	print()


for s in [*open(0)][1:]:
	print('1 ' * int(s))


t = int(input())
for _t in range(t):
	n = int(input())
	for i in range(n):
		print('1', end=' ')
	print()


count = int(input())
arr = []
for i in range(count):
	arr.append(int(input()))
for item in arr:
	newArr = [1] * item
	print(*newArr)


for ii in range(int(input())):
	n = int(input())
	print('1 ' * n)


a = int(input())
for i in range(a):
	t = int(input())
	for j in range(t):
		print(1, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	print(str(1) + (n - 1) * ' 1')


from sys import stdin

def ip():
	return [int(i) for i in stdin.readline().split()]

def sp():
	return [str(i) for i in stdin.readline().split()]

def solve():
	n = int(input())
	for i in range(n):
		print(1, '', end='')
	print()
t = int(input())
for i in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	a = [1 for i in range(n)]
	for i in range(n):
		print(a[i], end=' ')
	print()


for i in [*open(0)][1:]:
	for j in range(int(i)):
		print(1, end=' ')
	print()


import math
for _ in range(int(input())):
	n = int(input())
	d = [1] * n
	print(*d)


n = int(input())
while n:
	n -= 1
	print(' '.join('1' * int(input())))


t = int(input())
while t != 0:
	n = int(input())
	p = [1] * n
	print(*p)
	t -= 1


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	return False
for _ in range(int(input())):
	n = getN()
	print(*[1] * n)


for i in range(int(input())):
	n = int(input())
	for k in range(n):
		if k != n - 1:
			print(1, end=' ')
		else:
			print(1)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		result = [1] * n
		print(' '.join((str(x) for x in result)))
main()


t = int(input())
for _ in range(t):
	n = int(input())
	for x in range(n):
		print(1, end=' ')
	print()


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	print(*[1] * n)


t = int(input())
for _ in range(t):
	n = int(input())
	l = [1] * n
	print(*l)


n = int(input())
for i in range(n):
	num = int(input())
	print('1 ' * num)


t = int(input())
for a in range(t):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	ans = [1] * n
	print(*ans)


T = int(input().strip())
while T:
	T -= 1
	N = int(input().strip())
	for i in range(0, N):
		print('1', end=' ')
	print('')


import math
for w in range(int(input())):
	n = int(input())
	a = [1 for i in range(n)]
	print(*a)


for _ in range(int(input())):
	len_arr = int(input())
	print(' '.join(['1' for x in range(len_arr)]))


test = int(input())

def solve():
	n = int(input())
	for i in range(n):
		print('1', end=' ')
	print()
while test:
	solve()
	test -= 1


for _ in range(int(input())):
	li = [1] * int(input())
	print(*li)


for t in range(int(input())):
	n = int(input())
	arr = []
	for i in range(n):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	print(' '.join(map(str, [1] * int(input()))))


t = int(input())
for i in range(t):
	n = int(input())
	s = ''
	for j in range(n):
		s += '1 '
	print(s)


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	n = int(input())
	print(' '.join(['1'] * n))


production = True
import sys, math, collections

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()[:-1]
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = list(next_line)
		elif input_format == 4:
			formatted_input = list(map(int, list(next_line)))
		elif input_format == 5:
			formatted_input = next_line.split()
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 2:
		formatted_output = '\n'.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c

def mapl(iterable, format=0):
	if format == 0:
		return list(map(int, iterable))
	elif format == 1:
		return list(map(str, iterable))
	elif format == 2:
		return list(map(list, iterable))

def solve():
	n = input(11)
	out([1] * n, 1)
	return
for i in range(input(11)):
	solve()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = []
	for i in range(n):
		a.append(str(1))
	print(' '.join(a))


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(k):
	console('----- solving ------')
	lst = [1, 3]
	for _ in range(15):
		lst.append(lst[-1] + lst[-2] + 1)
	res = []
	for x in lst:
		res.append(x)
		res.append(x)
	return ' '.join((str(x) for x in res[:k]))

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	k = int(input())
	print(' '.join(['1' for _ in range(k)]))


for i in range(int(input())):
	for j in range(int(input())):
		print(1, end=' ')
	print('')


a = int(input())
for i in range(a):
	n = int(input())
	for j in range(1, n + 1):
		print(1, end=' ')
	print('')


for ii in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def pref(a, n, f):
	pre = [0] * n
	if f == 0:
		pre[0] = a[0]
		for i in range(1, n):
			pre[i] = a[i] + pre[i - 1]
	else:
		pre[-1] = a[-1]
		for i in range(n - 2, -1, -1):
			pre[i] = pre[i + 1] + a[i]
	return pre
maxint = 10 ** 24

def kadane(a, size):
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far
for _ in range(inin()):
	n = inin()
	l = [1] * n
	print(*l)


t = int(input())
for i in range(t):
	n = int(input())
	k = []
	for j in range(n):
		k.append('1')
	print(*k)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	for i in range(n):
		ans.append(1)
	print(*ans)


t = int(input())
for _ in range(t):
	n = int(input())
	res = ' '.join(['1'] * n)
	print(res)


for _ in range(int(input())):
	n = int(input())
	for j in range(n):
		print(1, end=' ')
	print()


for nt in range(int(input())):
	n = int(input())
	print(*[1] * n)


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	n = int(input())
	print(*[1] * n)


def func(num):
	for i in range(num):
		y = [1 for x in range(int(input()))]
		print(*y)
num = int(input())
func(num)


t = int(input())
while t > 0:
	n = int(input())
	arr = [1 for _ in range(n)]
	for i in range(n):
		if i == n - 1:
			print(arr[i], end='')
		else:
			print(arr[i], end=' ')
	print()
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


from collections import Counter
tests = int(input())
for _ in range(tests):
	(n,) = map(int, input().strip().split())
	arr = [1] * n
	[print(a, end=' ') for a in arr]
	print()


t = int(input())
for i in range(t):
	a = int(input())
	arr = [1] * a
	print(*arr)


for _ in range(int(input().strip())):
	n = int(input().strip())
	for i in range(n):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	arr = [1 for i in range(n)]
	print(*arr)


n = int(input())
for i in range(n):
	n1 = int(input())
	s = n1 * '1 '
	print(s)


tc = int(input())
for ctr in range(tc):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


T = int(input())
for _ in range(T):
	print(*[1] * int(input()))


a = int(input())
for i in range(a):
	print('1 ' * int(input()))


a = int(input())
for i in range(a):
	b = int(input())
	d = []
	for i in range(b):
		d.append(1)
	print(*d)


t = int(input())
while t > 0:
	n = int(input())
	while n > 0:
		print(1, end=' ')
		n -= 1
	print()
	t -= 1


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	n = II()
	a = []
	for i in range(n):
		a.append(1)
	print(*a)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	nList = [1 for i in range(n)]
	print(*nList)


t = int(input())
n = list()
a = list()
for x in range(t):
	n.append(int(input()))
	print('1 ' * n[x])


for testcases in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


x = int(input())
for _ in range(x):
	n = int(input())
	print(' '.join(['1'] * n))


def solve():
	n = int(input())
	l = [1] * 1000
	ll = l[:n]
	for i in ll:
		print(i, end=' ')
	print()
	return
t = 1
t = int(input())
while t > 0:
	t -= 1
	solve()


t = int(input())
for i in range(t):
	a = int(input())
	s = []
	for j in range(a):
		s.append(1)
	print(*s)


import random
for i in range(int(input())):
	n = int(input())
	arr = []
	for i in range(n):
		arr.append(1)
	print(*arr, sep=' ')


from collections import Counter
import sys
for _ in range(int(input())):
	n = int(input())
	arr = [1] * n
	print(*arr)


q = int(input())
while q != 0:
	q -= 1
	n = int(input())
	for i in range(0, n):
		print('1 ', end='')
	print('')


for _ in range(int(input())):
	n = int(input())
	for i in range(0, n):
		print(1, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	for j in range(n):
		print('1 ', end='')
	print('')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	print(*[1] * n)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [1] * n
	print(*a)


t = int(input())
for i in range(t):
	n = int(input())
	array = '1'
	for x in range(n - 1):
		array += ' 1'
	print(array)


def R():
	return map(int, input().split())

def L():
	return list(map(int, input().split()))

def I():
	return int(input())
for _ in range(I()):
	n = I()
	print('1 ' * n)


import math
t = int(input())
for g in range(t):
	n = int(input())
	A = [1] * n
	print(*A)


test = int(input())
for t in range(test):
	n = int(input())
	for x in range(n):
		print(1, end=' ')
	print()


t = int(input())
for _ in range(t):
	print(' '.join(['1'] * int(input())))


for tc in range(int(input())):
	for i in range(int(input())):
		print(1, end=' ')
	print()


testcases = int(input())
j = 0
while j < testcases:
	length = int(input())
	i = 0
	while i < length:
		print('1', end=' ')
		i += 1
	j += 1
	print(' ')


import sys
import math
import collections
import heapq

def set_debug(debug_mode=False):
	if debug_mode:
		fin = open('input.txt', 'r')
		sys.stdin = fin

def int_input():
	return list(map(int, input().split()))
t = int(input())
for ti in range(1, t + 1):
	n = int(input())
	A = [1] * n
	print(*A)


import sys
import os
readline = sys.stdin.readline
t = int(input())
while t:
	n = int(input())
	t -= 1
	for j in range(n):
		print(1, end=' ')
	print()


t = int(input())
for l in range(t):
	n = int(input())
	ans = [1 for i in range(n)]
	for i in ans:
		print(i, end=' ')
	print()


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	n = I()
	a = []
	for i in range(n):
		a.append(1)
	print(*a)
for _ in range(I()):
	solve()


t = int(input())
result = []
for i in range(t):
	n = int(input())
	result.append(' '.join([str(1) for e in range(n)]))
for m in result:
	print(m)


for _ in range(int(input())):
	print(' '.join((str(i) for i in [1] * int(input()))))


queries = int(input())
for i in range(queries):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	a = []
	ans = 1
	count = 2
	for i in range(n):
		a.append(1)
	print(*a)


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]
for _ in range(II()):
	ans = [1] * II()
	print(*ans)


try:
	t = int(input())
	while t:
		n = int(input())
		a = [1] * n
		print(*a)
except:
	pass


def func(n):
	return ' '.join(['1' for i in range(n)])

def main():
	t = int(input())
	input_list = [int(input()) for i in range(t)]
	for i in list(map(func, input_list)):
		print(i)
main()


test = int(input())
for _ in range(test):
	n = int(input())
	for _ in range(n):
		print(1, end=' ')
	print()


I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(n,) = I()
	ar = [1] * n
	print(*ar)


import sys
input = sys.stdin.buffer.readline

def iinp() -> int:
	return int(input())

def linp() -> list:
	return [int(z) for z in input().split()]

def sinp():
	return input().decode('unicode-escape')[0:-2]
for _ in range(iinp()):
	n = iinp()
	a = [1] * n
	for i in a:
		print(i, end=' ')
	print()


def solve(n):
	l = []
	for i in range(n):
		l.append(1)
	print(*l)
t = int(input())
for _ in range(t):
	n = int(input())
	solve(n)


import math as mt
import sys, string
input = sys.stdin.readline
from collections import defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
t = I()
for _ in range(t):
	n = I()
	print('1 ' * n)


for _ in range(int(input())):
	n = int(input())
	li = []
	for i in range(n):
		print('1 ', end='')
	print('')


x = int(input())
for i in range(x):
	y = int(input())
	z = '1 ' * y
	z1 = z[:-1]
	print(z1)


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	n = mint()
	print(*[1] * n)
for i in range(mint()):
	solve()


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	N = int(stdin.readline())
	ans = [1] * N
	print(*ans)


import sys
import os
from io import BytesIO, IOBase

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def ddi():
	return defaultdict(int)

def ddl():
	return defaultdict(list)

def ddd():
	return defaultdict(defaultdict(int))
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')
from collections import defaultdict
from math import gcd, pi, inf
for _ in range(ii()):
	n = ii()
	res = [1] * n
	print(*res)


t = int(input())
cases = []
for i in range(t):
	n = int(input())
	cases.append(n)
for case in cases:
	for i in range(case):
		print(1, end=' ')
	print()


T = int(input())
for it in range(T):
	n = int(input())
	print('1 ' * n)


from sys import stdout, stdin
(_input, _print) = (stdin.readline, stdout.write)
(_int, _range) = (int, range)

def solution():
	for _ in _range(_int(_input())):
		n = _int(_input())
		print(*[1] * n)
solution()


x = int(input())
for i in range(x):
	a = int(input())
	l = []
	for i in range(a):
		l.append('1')
	print(' '.join(l))


for case in range(int(input())):
	n = int(input())
	a = [1] * n
	print(*a)


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = int(inp())
	ans = [1] * n
	print(*ans)


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
while t:
	n = int(input())
	l = [1] * n
	print(*l)
	t -= 1


t = int(input())
ans = []
for tt in range(t):
	n = int(input())
	arr = []
	for i in range(n):
		arr.append(1)
	ans.append(arr)
for i in range(len(ans)):
	for j in range(len(ans[i])):
		print(ans[i][j], end=' ')
	print()


j = int(input())
for i in range(j):
	c = int(input())
	print('1 ' * c)


for _ in range(int(input())):
	n = int(input())
	print(' '.join([str(1)] * n))


for i in range(int(input())):
	n = int(input())
	for j in range(n):
		print(1, end=' ')
		if j == n - 1:
			print('')


t = int(input())
for _ in range(t):
	n = int(input())
	out = [1] * n
	print(*out)


tc = int(input())
for i in range(tc):
	n = int(input())
	s = []
	for i in range(n):
		s.append('1 ')
	print(''.join(s))


t = int(input())
import math
for _ in range(t):
	n = int(input())
	print('1 ' * n)


n = int(input())
for i in range(n):
	n = int(input())
	out = '1 '
	print(out * n)


import math
n = int(input())
for i in range(n):
	t = int(input())
	print(*[1] * t)


import math
for _ in range(int(input())):
	a = int(input())
	l = [1] * a
	print(*l)


import sys, collections

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	n = int(input())
	arr = [1] * n
	print(*arr)


t = int(input())
for case in range(0, t):
	n = int(input())
	print('1 ' * n)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		print(' '.join(['1' for _ in range(n)]))
main()


for i in range(int(input())):
	n = int(input())
	v = []
	for i in range(1, n + 1):
		v.append(1)
	print(*v)


import math
import bisect
import copy
import time
from collections import Counter
for _ in range(int(input())):
	n = int(input())
	l = [1] * n
	print(*l)


import sys

def solve(a):
	result = [1 for i in range(a)]
	return result
IN = [x.strip() for x in sys.stdin.readlines()]
T = int(IN[0])
cur = 1
for ti in range(T):
	a = int(IN[cur])
	result = solve(a)
	print(' '.join([str(a) for a in result]))
	cur += 1


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	n = int(input())
	print(*[1] * n)


t = int(input())
while t:
	n = int(input())
	ans = [1] * n
	ans = ' '.join((str(i) for i in ans))
	print(ans)
	t -= 1


import sys
input = sys.stdin.readline
MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input().strip('\n'))
si = lambda : input().strip('\n')
dgl = lambda : list(map(int, input().strip('\n')))
f = lambda : map(int, input().strip('\n').split())
il = lambda : list(map(int, input().strip('\n').split()))
ls = lambda : list(input().strip('\n'))
lsc = lambda : list(input().strip('\n').split(' '))
lsi = lambda : [int(i) for i in ls()]
let = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(ii()):
	n = ii()
	print(*[1] * n)


def solve():
	print(' '.join(('1' for _ in range(int(input())))))

def main():
	for case in range(int(input())):
		solve()
main()


t = int(input())

def solve():
	n = int(input())
	print(n * '1 ')
for _ in range(t):
	solve()


def f(n):
	return ' '.join(map(str, [1 for _ in range(n)]))
for i in range(int(input())):
	print(f(int(input())))


T = int(input())
for t in range(T):
	n = int(input())
	print('1 ' * n)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = [1] * n
	for i in range(n):
		if i != n - 1:
			print(ans[i], end=' ')
		else:
			print(ans[i])


T = int(input())
for _ in range(T):
	n = int(input())
	s = [1] * n
	print(*s)


test_case = int(input())
for i in range(test_case):
	l = []
	k = 1
	length = int(input())
	for j in range(1, length + 1):
		l.append(str(1))
		k += j
	print(' '.join(l))


t = int(input())
for _ in range(t):
	n = int(input())
	lis = [1] * n
	print(*lis)


for _ in range(int(input())):
	n = int(input())
	l = [1 for x in range(1, n + 1)]
	print(*l)


for t in range(int(input())):
	n = int(input())
	l = ['1'] * n
	print(' '.join(l))


q = int(input())
for i in range(q):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


n = int(input())
for i in range(n):
	m = int(input())
	for i in range(1, m + 1):
		print(1, end=' ')
	print()


from math import *
from itertools import *
from collections import *
import sys
INF = int(100000.0 + 1)
pi = 3.141592653589793

def ii():
	return int(input())

def mas():
	return input().split()

def masint():
	return [int(i) for i in mas()]

def solve():
	n = ii()
	h = [1] * n
	print(*h)

def main():
	t = ii()
	while t:
		solve()
		t -= 1
main()


for _ in range(int(input())):
	n = int(input())
	l = [1] * n
	print(' '.join(map(str, l)))


for i in range(int(input())):
	n = int(input())
	a = []
	for i in range(n):
		a.append(1)
	print(*a)


import math
from collections import defaultdict, deque
from sys import stdin
from bisect import bisect_left, bisect_right

def mp():
	return map(int, stdin.readline().split())

def ml():
	return list(map(int, stdin.readline().split()))
for _ in range(int(input())):
	n = int(input())
	a = [1] * n
	print(*a)


t = int(input())
while t > 0:
	n = int(input())
	result = [1] * n
	print(*result)
	t -= 1


T = int(input())

def solve():
	N = int(input())
	print(' '.join(['1'] * N))
for _ in range(T):
	solve()


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		n = iin()
		l = [1] * n
		print(*l)
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()


def main():
	for _ in range(int(input())):
		print('1 ' * int(input()))
main()


t = int(input())
temp = 0
for _ in range(t):
	x = int(input())
	arr = [1 for _ in range(x)]
	print(*arr)


t = int(input())
while t:
	n = int(input())
	t -= 1
	for j in range(n):
		print(1, end=' ')
	print()


for i in range(int(input())):
	n = int(input())
	L = [1 for j in range(n)]
	print(*L)


t = int(input())
while t:
	n = int(input())
	li = ''
	for i in range(n):
		li += '1 '
	print(li)
	t -= 1


for _ in range(int(input())):
	i_liczb = int(input())
	print('1 ' * i_liczb)


n = int(input())
for i in range(n):
	t = int(input())
	st = '1'
	for j in range(t - 1):
		st += ' 1'
	print(st)


for _ in range(int(input())):
	a = []
	for i in range(int(input())):
		a.append(1)
	print(*a)


from sys import stdin, stdout
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	n = IN()
	print('1 ' * n)
for _ in range(IN()):
	case()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	print(*[1] * n)


for i in range(int(input())):
	n = int(input())
	for k in range(n):
		print(1, end=' ')
	print('')


for i in range(int(input())):
	n = int(input())
	print(' '.join([str(1)] * n))


t = int(input())
for i in range(t):
	n = int(input())
	ele = 1
	l = []
	for i in range(n):
		l.append(ele)
	for i in l:
		print(i, end=' ')
	print()


def main():
	for __ in [0] * int(input()):
		N = int(input())
		print(*[1] * N)
main()


n = int(input())
for i in range(n):
	t = int(input())
	l = []
	x = 1
	for j in range(t):
		l.append(x)
	print(*l)


for _ in range(int(input())):
	a = int(input())
	c = [1 for i in range(2, a + 2)]
	print(' '.join((str(i) for i in c)))


tests = int(input())
for test in range(tests):
	n = int(input())
	ans = ['1'] * n
	print(' '.join(ans))


t = int(input())
for _ in range(t):
	n = int(input())
	result = [1 for i in range(n)]
	print(*result)


def solve(n):
	return [1] * n

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


from os import path
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 0

def solve():
	for _ in range(ii()):
		n = ii()
		a = [1] * n
		print(*a)
if file:
	if path.exists('input1.txt'):
		sys.stdin = open('input1.txt', 'r')
		sys.stdout = open('output1.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


for i in range(int(input())):
	a = int(input())
	b = [1 for j in range(a)]
	print(*b)


T = int(input())
for _ in range(T):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


test = int(input())
t = 0
while t < test:
	want = []
	n = int(input())
	for array in range(n):
		want.append(str(1))
	print(' '.join(want))
	t = t + 1


for _ in [0] * int(input()):
	print('1 ' * int(input()))


for test_case in range(int(input())):
	ans = [1] * int(input())
	print(*ans)


t = int(input())
i = 0
while i < t:
	n = int(input())
	k = []
	for s in range(n):
		k.append('1')
	print(' '.join(k))
	i += 1


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = int(input())
for _ in range(t):
	n = int(input())
	print('1' + ' 1' * (n - 1))


t = int(input())
while t != 0:
	s = int(input())
	while s != 0:
		print(1, end=' ')
		s = s - 1
	print()
	t = t - 1


def solve():
	arr = []
	n = int(input())
	while n > 0:
		print('1', end=' ')
		n = n - 1
	print()
t = int(input())
for i in range(t):
	solve()


def main():
	n = int(input())
	a = [1] * n
	print(*a)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


for n in [*open(0)][1:]:
	print('1 ' * int(n))


for i in range(int(input())):
	n = int(input())
	a = [1] * n
	print(*a, sep=' ')


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return
mod = 10 ** 9 + 7

def solve():
	n = II()
	li = [1 for i in range(n)]
	print(*li)
t = II()
for i in range(t):
	solve()


t = 1
t = int(input())
while t:
	t -= 1
	n = int(input())
	for _ in range(n):
		print(1, end=' ')
	print('')


t = int(input())
for _ in range(t):
	l = int(input())
	for i in range(l):
		print('1', end=' ')
	print()


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = [1] * n
		maxAElement = 1000
		print(*a)
main()


for i in range(int(input())):
	n = int(input())
	array = [1 for i in range(n)]
	print(''.join([f'{i} ' for i in array]))


for x in range(int(input())):
	l = int(input())
	lst = list()
	k = 1
	while l >= 1:
		lst.append(k)
		l = l - 1
	print(*lst)


T = int(input())
for _ in range(T):
	N = int(input())
	A = []
	for i in range(N):
		A.append(1)
	print(*A)


from collections import Counter, defaultdict
BS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def to_base(s, b):
	res = ''
	while s:
		res += BS[s % b]
		s //= b
	return res[::-1] or '0'
alpha = 'abcdefghijklmnopqrstuvwxyz'
from math import floor, ceil, pi, log
import sys
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919]
import timeit

def primef(n, plst=[]):
	if n == 1:
		return plst
	else:
		for m in primes:
			if n % m == 0:
				return primef(n // m, plst + [m])
		return primef(1, plst + [n])

def lmii():
	return list(map(int, input().split()))

def ii():
	return int(input())

def countOverlapping(string, sub):
	count = start = 0
	while True:
		start = string.find(sub, start) + 1
		if start > 0:
			count += 1
		else:
			return count

def base10Len(n):
	return len(str(n))
t = int(input())
for i in range(t):
	n = int(input())
	print('1 ' * n)


for i in range(int(input())):
	n = int(input())
	arr = ['1' for i in range(0, n)]
	print(' '.join(arr))


t = int(input())
for test in range(t):
	n = int(input())
	r = [str(1) for i in range(n)]
	print(' '.join(r))


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	n = inputnum()
	for i in range(n):
		print(1, end=' ')
	print()


test = int(input())
for _ in range(test):
	n = int(input())
	l = ['1'] * n
	print(' '.join(l))


t = int(input())
for temp in range(t):
	n = int(input())
	answ = [1] * n
	print(*answ)


for _ in range(int(input())):
	n = int(input())
	b = []
	for i in range(n):
		b.append('1')
	print(*b)


t = int(input())
while t != 0:
	n = int(input())
	l = [1 for i in range(n)]
	print(*l)
	t = t - 1


import sys, math
input = lambda : sys.stdin.readline().rstrip()

def meh(m):
	an = 0
	while True:
		if an not in m:
			return an
		else:
			an += 1
for _ in range(int(input())):
	n = int(input())
	s = '1 '
	print(s * n)


import sys
sys.setrecursionlimit(10000)
t = int(input())
for _ in range(t):
	n = int(input())
	a = [1] * n
	print(*a)


import sys, collections, math

def in_out():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for _ in range(int(input())):
	n = int(input())
	arr = [1] * n
	print(*arr)


import sys
from collections import defaultdict
from functools import reduce
t = int(input())
for _ in range(t):
	n = int(input())
	a = ['1'] * n
	print(' '.join(a))


t = int(input())
while t > 0:
	n = int(input())
	res = ['1'] * n
	print(' '.join(res))
	t -= 1


for yeet in range(int(input())):
	for bruh in range(int(input())):
		print(1, end=' ')
	print()


a = int(input())
while a:
	n = int(input())
	arr = []
	for i in range(n):
		arr.append(1)
	print(*arr)
	a -= 1


import sys
input = sys.stdin.buffer.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	l = [1 for i in range(n)]
	print(*l, sep=' ')


a = int(input())
i = 0
while i < a:
	b = int(input())
	g = ''
	c = 0
	while c < b:
		g = g + '1'
		g = g + ' '
		c = c + 1
	print(g)
	i = i + 1


from sys import stdin, stdout

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline()
for _ in range(ii()):
	n = ii()
	l1 = [1] * n
	print(*l1)


t = int(input())
for i in range(t):
	n = int(input())
	ar = []
	for i in range(n):
		ar.append(1)
	print(*ar)


a = int(input())
for _ in range(a):
	x = int(input())
	li = [1] * x
	print(*li)


test = int(input())
for i in range(test):
	inp = int(input())
	for j in range(inp):
		print(1, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [1] * n
	print(*arr)


tt = int(input())
for z in range(tt):
	n = int(input())
	a = [1] * n
	print(*a)


for T in range(int(input())):
	x = int(input())
	for i in range(x):
		print(1, end=' ')
	print()


t = int(input())
answer = []
for a in range(t):
	n = int(input())
	line = ['1' for i in range(n)]
	answer.append(' '.join(line))
for b in answer:
	print(b)


t = int(input())
arr = []
for i in range(t):
	n = int(input())
	arr.append(n)
for j in range(t):
	for h in range(arr[j]):
		if h == arr[j] - 1:
			print('1')
		else:
			print('1', end=' ')


a = input()
for x in range(int(a)):
	b = input()
	for i in range(int(b)):
		if i != int(b) - 1:
			print(1, end=' ')
		else:
			print(1)


t = int(input())
while t:
	n = int(input())
	print('1 ' * n)
	t = t - 1


from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
for i in range(ip()):
	n = ip()
	print(*[1] * n)


t = int(input())
for i in range(t):
	a = []
	n = int(input())
	for j in range(n):
		a = [1] * n
	print(*a)


t = int(input())
for i in range(t):
	num = int(input())
	l = [print('1', end=' ') for j in range(num)]
	print()


import sys
import math
import bisect
from sys import stdin
from itertools import groupby
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	N = int(input())
	print(*list('1' * N))


from sys import stdin as cin

def main():
	t = int(next(cin).strip())
	for i in range(t):
		n = int(next(cin).strip())
		print(' '.join(['1'] * n))
main()


k = int(input())
for i in range(k):
	n = int(input())
	a = [1 for item in range(n)]
	print(*a, sep=' ')


import math
I = lambda : list(map(int, input().split(' ')))
for _ in range(int(input())):
	n = int(input())
	print(' '.join(map(str, [1] * n)))


T = int(input())
for t in range(1, T + 1):
	N = int(input())
	for i in range(N):
		print(1, ' ', end='')
	print()


for _ in range(int(input())):
	i = 1
	n = int(input())
	ar = [1] * n
	print(*ar)


def solve(n):
	res = [1 for i in range(0, n)]
	print(' '.join(map(str, res)))
	pass
t = int(input())
for i in range(t):
	n = int(input())
	solve(n)


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans

def how_many(l, r, c):
	m = (l + r) // 2
	if r - l == 1:
		if s[l] == c:
			return 0
		else:
			return 1
	d = s[l:m]
	k1 = (r - l) // 2 - s[l:m].count(c) + how_many(m, r, chr(ord(c) + 1))
	k2 = (r - l) // 2 - s[m:r].count(c) + how_many(l, m, chr(ord(c) + 1))
	return min(k1, k2)
for _ in range(int(input())):
	n = int(input())
	a = [1] * n
	print(*a)


from sys import stdin
t = int(stdin.readline().strip())
for i in range(t):
	n = int(stdin.readline().strip())
	print(*[1] * n)


num = int(input(''))
for i in range(num):
	n = int(input(''))
	ans = []
	for i in range(n):
		ans.append(1)
	answer = [str(i) for i in ans]
	print(' '.join(answer))


t = int(input())
for s in range(t):
	n = int(input())
	print('1 ' * n)


def solve(n):
	return [1] * n
t = int(input())
for _ in range(t):
	n = int(input())
	print(' '.join(map(str, solve(n))))


for _ in range(int(input())):
	w = int(input())
	l = ['1'] * w
	print(*l, sep=' ')


for h in range(int(input())):
	n = int(input())
	print(*[1] * n)


for ttt in range(int(input())):
	n = int(input())
	print(*[1] * n)


n = int(input())
for i in range(n):
	s = int(input())
	for j in range(s):
		print('1', end=' ')
	print()


for tt in range(int(input())):
	n = int(input())
	ans = []
	for i in range(n):
		ans.append(1)
	print(*ans)


import math
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	num = int(input())
	ans = [1] * num
	print(*ans)


t = int(input())
for x in range(t):
	n = int(input())
	print(' '.join(('1' for i in range(n))))


for _ in range(int(input())):
	x = int(input())
	for i in range(x):
		print(1, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	ar = [1] * n
	print(*ar)


import os
import sys
from io import BytesIO, IOBase

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		lst = [1] * n
		print(*lst)
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()


t = int(input())
nums = []
for i in range(t):
	nums.append(int(input()))
output = []
for num in nums:
	output.append([1] * num)
for out in output:
	print(*out)


tt = int(input())
for _ in range(tt):
	nn = int(input())
	for i in range(nn):
		print(1, end=' ')
	print()


def solve(n, A):
	result = ''
	return result

def main():
	T = int(input())
	for i in range(1, T + 1):
		n = int(input())
		result = ['1'] * n
		print(' '.join(result))
main()


for i in range(int(input())):
	n = int(input())
	l1 = [1] * n
	for j in range(n):
		print(l1[j], end=' ')
	print('\n', end='')


def solve(n):
	res = []
	for j in range(n):
		res.append(1)
	return res
t = int(input())
while t:
	n = int(input())
	print(*solve(n))
	t -= 1


test = int(input())
for _ in range(test):
	n = int(input())
	k = 1
	for i in range(n):
		print(k, end=' ')
	print()


k = int(input())
for i in range(k):
	po = [1]
	a = int(input())
	jo = po * a
	print(*jo)


def solve1():
	n = int(input())
	print('1 ' * n)
for _ in range(int(input())):
	solve1()


for _ in range(int(input())):
	print('1 ' * (int(input()) - 1), '1', sep='')


n = int(input())
for i in range(n):
	x = int(input())
	for j in range(x):
		print('1', end=' ')
	print()


import sys
input = sys.stdin.readline
T = int(input())
for testcase in range(T):
	n = int(input())
	print(*[1] * n)


t = int(input().split()[0])
for case in range(t):
	n = int(input().split()[0])
	arr = [1] * n
	print(*arr)


T = int(input())
for i in range(T):
	n = int(input())
	j = 0
	while j < n:
		if j == n - 1:
			print(1, end='')
		else:
			print(1, end=' ')
		j += 1
	print('')


for i in range(int(input())):
	numberOfOnes = int(input())
	print('1 ' * numberOfOnes)


def solve(l):
	return ' '.join(map(str, [1] * l))

def main():
	t = int(input())
	for _ in range(t):
		l = int(input())
		print(solve(l))
main()


t = int(input())
for i in range(t):
	v = int(input())
	for j in range(v):
		print(1, end=' ')
	print('')


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	a = [1] * n
	print(*a)


t = int(input())
for i in range(t):
	n = int(input())
	a = [str(1)] * n
	print(' '.join(a))


for _ in range(int(input())):
	n = int(input())
	l = []
	for i in range(n):
		l.append(1)
	print(*l, sep=' ')


t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = [1 for i in range(n)]
	print(*arr)


def ques1(n):
	l = [1 for i in range(n)]
	print(*l)
t = int(input())
for i in range(t):
	n = int(input())
	ans = ques1(n)
	ans


for i in range(int(input())):
	n = int(input())
	ans = [1] * n
	print(*ans)


for _ in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, sep=' ', end=' ')
	print()


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))
(t,) = mp()
for _ in range(t):
	(n,) = mp()
	for i in range(n):
		cout('1 ')
	cout('\n')


import sys
import random
from fractions import Fraction
from math import *

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def finput():
	return float(input())

def tinput():
	return input().split()

def linput():
	return list(input())

def rinput():
	return map(int, tinput())

def fiinput():
	return map(float, tinput())

def rlinput():
	return list(map(int, input().split()))

def trinput():
	return tuple(rinput())

def srlinput():
	return sorted(list(map(int, input().split())))

def NOYES(fl):
	if fl:
		print('NO')
	else:
		print('YES')

def YESNO(fl):
	if fl:
		print('YES')
	else:
		print('NO')

def main():
	n = iinput()
	print(*[1 for i in range(n)])
for i in range(iinput()):
	main()


def ans(n):
	arr = []
	for _ in range(n):
		arr.append(1)
	return arr
t = int(input())
for i in range(t):
	n = int(input())
	a = ans(n)
	print(*a, sep=' ')


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	n = int(input())
	print('1 ' * n)

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


for test in range(0, int(input())):
	n = int(input())
	arr = []
	for i in range(0, n):
		arr.append(1)
	print(*arr)


T = int(input())
for _ in range(T):
	n = int(input())
	a = [1 for i in range(n)]
	print(*a, sep=' ')


import sys
import math
import bisect
import heapq
from bisect import bisect_right
from sys import stdin, stdout

def get_ints_in_variables():
	return map(int, sys.stdin.readline().strip().split())

def get_int():
	return int(sys.stdin.readline())

def get_ints_in_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_list_of_list(n):
	return [list(map(int, sys.stdin.readline().strip().split())) for _ in range(n)]

def get_string():
	return sys.stdin.readline().strip()

def Solution():
	pass

def main():
	for _ in range(get_int()):
		n = get_int()
		for _ in range(1, n + 1):
			print(1, end=' ')
		print()
main()


for i in range(int(input())):
	n = int(input())
	l = []
	for j in range(n):
		l.append(1)
	for j in range(len(l)):
		if j == len(l) - 1:
			print(l[j])
		else:
			print(l[j], end=' ')


N = int(input())
for _ in range(N):
	n = int(input())
	for _ in range(n):
		print('1', end=' ')
	print()


no_of_testcases = int(input())
test_cases = []
for i in range(no_of_testcases):
	arr_len = int(input())
	test_cases.append(arr_len)
for i in range(no_of_testcases):
	for j in range(test_cases[i]):
		if j == test_cases[i] - 1:
			print('1')
		else:
			print('1 ', end='')


cases = int(input())
for _ in range(cases):
	length = int(input())
	print(' '.join(['1'] * length))


n = int(input())
for i in range(n):
	e = int(input())
	for x in range(0, e):
		print(1, end=' ')
	print()


import random
t = int(input())
for z in range(t):
	x = []
	n = int(input())
	for j in range(n):
		x.append(int(1))
	print(*x)


n = int(input())
for i in range(n):
	x = int(input())
	for i2 in range(x):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	print(*[1 for i in range(int(input()))])


from sys import stdin

def input():
	return stdin.readline()
for _ in range(int(input())):
	n = int(input())
	a = [1] * n
	print(*a)


for i in range(int(input())):
	a = int(input())
	for j in range(a):
		if j < a - 1:
			print(1, end=' ')
		else:
			print(1)


t = int(input())
cases = []
for i in range(t):
	cases.append(int(input()))

def solve(case):
	print(' '.join(('1' for i in range(case))))
for case in cases:
	solve(case)


for _ in range(0, int(input())):
	n = int(input())
	print(' '.join((str(x) for x in [1 for i in range(0, n)])))


try:
	for _ in range(int(input())):
		n = int(input())
		for i in range(n):
			print(1, end=' ')
		print()
except:
	pass


t = int(input())
for _ in range(t):
	n = int(input())
	L = [1] * n
	print(*L)


a = int(input())
for x in range(a):
	b = int(input())
	for x in range(b):
		print(1, end=' ')
	print()


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def printAllSubstrings(s, n):
	l = {}
	for i in range(n):
		temp = ''
		for j in range(i, n):
			temp += s[j]
			if temp not in l:
				l[temp] = 0
			l[temp] += 1
	return l
MOD = 1000000007
PMOD = 998244353
T = 1
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	print(*[1] * n)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	n = int(inp())
	a = [1] * n
	print(*a)
testcase(int(inp()))


for i in range(int(input())):
	oo = int(input())
	print('1 ' * oo)


import sys

def input():
	return sys.stdin.readline().rstrip()

def input_split():
	return [int(i) for i in input().split()]
testCases = int(input())
answers = []
for _ in range(testCases):
	n = int(input())
	ans = [1] * n
	answers.append(ans)
for ans in answers:
	print(*ans, sep=' ')


cases = int(input())
for i in range(cases):
	a = input()
	for i in range(int(a)):
		print(1, end=' ')
	print()


from math import *
from copy import *
from string import *
from random import *
from sys import stdin, stdout
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
import math
import time
from queue import Queue

def seive(n):
	l = [True]
	l = l * (n + 1)
	for i in range(2, int(sqrt(n)) + 1):
		if l[i] == True:
			val = i * i
			while val < len(l):
				l[val] = False
				val += i
	prime = []
	for i in range(2, len(l)):
		if l[i] == True:
			prime.append(i)
	return prime

def dp(l, i, n, val, ans):
	if i >= n or val < 0:
		return 1000000
	elif val == 0:
		return 0
	else:
		if ans[i] == 1000000:
			ans[i] = min(min(1 + dp(l, i + 1, n, val - l[i], ans), 1 + dp(l, i, n, val - l[i], ans)), dp(l, i + 1, n, val, ans))
		return ans[i]
from queue import Queue

def factors(n):
	l = []
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def check1(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v -= 1

def check2(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v += 1

def up(n):
	j = n - 1
	while j > 0:
		if n % j == 0:
			break
		j -= 1
	return j

def fac(n):
	c = 1
	i = 1
	while i <= n:
		c *= i
		i += 1
	return c

def check_happy(n):
	ss = set()
	print(n)
	while n != 1:
		val = n
		s = 0
		print(val)
		while val != 0:
			s += (val % 10) ** 2
			val = val // 10
		print(val)
		print('hi')
		if val in ss:
			return False
		else:
			n = val
			ss.add(n)
	return True

def update(a, b):
	c = 1
	val = a
	while a < b:
		print(c, a)
		c += c
		a += a
	print(1)
	while a > b:
		print()
		a -= val
		c -= 1
	return c
import random as rand
t = int(input())
for i in range(t):
	n = int(input())
	l = [1] * n
	print(*l)


a = int(input())
for i in range(a):
	s = int(input())
	ans = [1] * s
	print(*ans)


import math
import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	ar = [1] * n
	[print(ar[i], end=' ') for i in range(n)]
	print()


for u in range(int(input())):
	n = int(input())
	x = [1] * n
	print(*x)


for i in range(int(input())):
	n = int(input())
	array = [1] * n
	print(*array, sep=' ')


from __future__ import division, print_function
import os, sys
import math
import collections
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

class my_dictionary(dict):

	def __init__(self):
		self = dict()

	def add(self, key, value):
		self[key] = value

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def binary_search(arr, low, high, x):
	if high >= low:
		mid = (high + low) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binary_search(arr, low, mid - 1, x)
		else:
			return binary_search(arr, mid + 1, high, x)
	else:
		return -1

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def padded_bin_with_complement(x):
	if x < 0:
		return bin(2 ** 16 - abs(x))[2:].zfill(16)
	else:
		return bin(x)[2:].zfill(16)

def binaryToDecimal(binary):
	binary1 = binary
	(decimal, i, n) = (0, 0, 0)
	while binary != 0:
		dec = binary % 10
		decimal = decimal + dec * pow(2, i)
		binary = binary // 10
		i += 1
	print(decimal)

def CountFrequency(my_list):
	freq = {}
	for item in my_list:
		if item in freq:
			freq[item] += 1
		else:
			freq[item] = 1
	return freq

def pos(a):
	b = [0] * len(a)
	c = sorted(a)
	for i in range(len(a)):
		for j in range(len(a)):
			if c[j] == a[i]:
				b[i] = j
				break
	return b

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n

def commonn(a, b, n):
	c = []
	for i in range(n):
		if a[i] == b[i]:
			c.append('-1')
		else:
			c.append(b[i])
	return c

def primeFactors(n):
	j = []
	while n % 2 == 0:
		j.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			j.append(int(n))
			n = n / i
	if n > 2:
		j.append(int(n))
	return j

def sumdigit(n):
	n = str(n)
	k = 0
	for i in range(len(n)):
		k += int(n[i])
	return k

def main():
	for _ in range(ii()):
		n = ii()
		a = [1] * n
		print(*a)
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for test in range(t):
	n = int(input())
	print(*[1 for _ in range(n)])


for _ in range(int(input())):
	n = int(input())
	arr = []
	for i in range(1, n + 1):
		arr.append(1)
	print(' '.join([str(x) for x in arr]))


import sys

def read():
	return sys.stdin.readline()

def write(x):
	sys.stdout.write(str(x) + '\n')

def main():
	t = int(read())
	while t:
		n = int(read())
		write('1 ' * n)
		t -= 1
main()


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	n = ii()
	print(*[1] * n)


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	n = inin()
	print(*[1] * n)


for _ in range(int(input())):
	n = int(input())
	i = 0
	lists = [1]
	while i < n - 1:
		lists.append(1)
		i = i + 1
	print(*lists)


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(n, k):
	return 0

def main():
	for _ in range(ri()):
		n = ri()
		wia([1] * n)
main()


def read_line(type=int):
	return list(map(type, input().split()))

def sum_from_1_to_(i):
	return i * (i + 1) // 2

def is_odd(a):
	return a % 2 == 0
t = int(input())
for _ in range(t):
	n = int(input())
	print(*[1] * n)


n = int(input())
for i in range(n):
	x = int(input())
	y = ['1'] * x
	print(' '.join(y))


n = int(input())
cases = [int(input()) for _ in range(n)]
for i in cases:
	lst = [1] * i
	[print(_, end=' ') for _ in lst]
	print('')


for _ in range(int(input())):
	n = input()
	for __ in range(int(n)):
		print(1, end=' ')
	print()


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [str(1) for x in range(n)]
	print(' '.join(arr))


def solve():
	n = int(input())
	print('1 ' * n)
for i in range(int(input())):
	solve()


n = int(input())

def main():
	x = int(input())
	ret = [1] * x
	return ret
ans = []
for _ in range(n):
	a = main()
	ans.append(a)
for a in ans:
	print(*a)


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	n = ri()
	print(*[1] * n)
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


input_t = int(input())
for i in range(input_t):
	input_n = int(input())
	for i in range(input_n):
		print(1, end=' ')
	print()


t = int(input())
for you in range(t):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


def testcase():
	n = int(input())
	arr = [1 for _ in range(n)]
	for a in arr:
		print(a, end=' ')
	print()
t = int(input())
for _ in range(t):
	testcase()


rw = int(input())
for qerw in range(rw):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print('')


p = int(input())
for i in range(0, p):
	q = int(input())
	k = 1
	l = []
	for j in range(0, q):
		l.append(1)
	l = [str(u) for u in l]
	print(' '.join(l))


from sys import stdin
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	out = ['1'] * n
	print(*out)


t = int(input())

def primes(n):
	count = 0
	rl = 0
	while n % 2 == 0:
		n = n // 2
		count += 1
	while n % 3 == 0:
		n = n // 3
		rl += 1
	if n != 1 or count > rl:
		return -1
	else:
		return [rl, count]

def fff(n):
	n = str(n)
	sums = 0
	for tl in n:
		sums += int(tl)
	return sums
from math import *
for xy in range(t):
	n = int(input())
	arr = ['1'] * n
	print(' '.join(arr))


def OmkarandCompletion(n):
	string = ''
	for i in range(n):
		string += '1 '
	return string
Lista = []
total = int(input())
for i in range(total):
	Lista.append(int(input()))
for j in Lista:
	print(OmkarandCompletion(j))


test = int(input())
for t in range(test):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


from sys import stdin

def solve(n):
	print(*[1] * n)
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	solve(n)


n = int(input())
count = []
for i in range(n):
	size = int(input())
	count.append(size)
for i in count:
	list = []
	for j in range(i - 1):
		print('1', end=' ')
	print('1')


t = int(input())
while t > 0:
	n = []
	m = int(input())
	for i in range(m):
		n.append('1')
	print(' '.join(n))
	t -= 1


import math

def shrey():
	n = int(input())
	a = []
	for i in range(1, n + 1):
		a.append(1)
	for i in range(len(a)):
		print(a[i], end=' ')
	print()
T = input()
T = int(T)
for q in range(1, T + 1):
	shrey()


t = int(input())
for ty in range(t):
	n = int(input())
	for j in range(n - 1):
		print(1, end=' ')
	print(1)


num = int(input())
arr = []
for i in range(num):
	arr.append(int(input()))
for i in range(len(arr)):
	b = [1] * int(arr[i])
	print(*b, sep=' ')


import collections
t = int(input())
se = set()
for i in range(t):
	n = int(input())
	for j in range(n):
		print(1, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	nums = []
	for i in range(n):
		nums.append(1)
	for i in nums:
		print(i, end=' ')
	print('')


for _ in range(int(input())):
	size = int(input())
	lst = [1] * size
	print(*lst)


from __future__ import division, print_function
import itertools, os, sys, threading
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from math import sqrt, floor, factorial, gcd, log
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from math import gcd
from bisect import bisect
from random import randrange
input = lambda : sys.stdin.readline().rstrip('\r\n')
read = lambda : list(map(int, input().strip().split(' ')))

def main():
	for _ in range(int(input())):
		print(*[1] * int(input()))
main()


import sys
import math
from collections import defaultdict as dd
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(input())
	l = [1] * n
	print(*l)


import sys
input = sys.stdin.buffer.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	k = 1
	for i in range(n):
		print(k, end=' ')
	print()


n = int(input())
l = [1]
for i in range(n):
	m = int(input())
	a = l * m
	print(*a)


t = int(input())
for case in range(t):
	n = int(input())
	print(' '.join(['1'] * n))


for t in range(int(input())):
	n = int(input())
	for i in range(0, n):
		print(1, end=' ')
	print()


for I in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for j in range(int(input())):
	a = int(input())
	count = 0
	while count < a:
		print(1, end=' ')
		count += 1
	print('')


t = int(input())
for t1 in range(t):
	n = int(input())
	a = [1] * n
	print(*a)


for tt in range(int(input())):
	n = int(input())
	print(*[1] * n)


n = int(input())
l = list()
for i in range(n):
	l.append(int(input()))
for j in l:
	str = '1' * j
	for k in str:
		print(int(k), '', end='')
	print()


n = int(input())
li = []
for i in range(n):
	a = int(input())
	li.append(a)
for item in li:
	answer = []
	while item - len(answer) > 0:
		answer.append(1)
	print(*answer)


t = int(input())
for t in range(t):
	n = int(input())
	array = ['1' for i in range(n)]
	output = ' '.join(array)
	print(output)


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def main():
	try:
		n = I()
		l = ['1'] * n
		print(*l)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def li():
	return [int(x) for x in input().split()]

def fli():
	return [float(x) for x in input().split()]

def gi():
	return [x for x in input().split()]

def fi():
	return int(input())

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')
t = fi()
while t > 0:
	t -= 1
	n = fi()
	for i in range(n):
		print(1, end=' ')
	print()


for j in range(int(input())):
	n = int(input())
	for h in range(n):
		print('1', end=' ')
	print()


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	N = int(input())
	ans = [1] * N
	print(*ans)


import math
t = int(input())
for i in range(t):
	print(' '.join([str(1) for x in range(int(input()))]))


y = int(input())
ans = []
for i in range(y):
	n = int(input())
	for j in range(n):
		print('1', end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	q = [1] * n
	print(*q)


t = int(input())

def fun(n):
	a = []
	for i in range(n):
		a.append(1)
	print(*a, sep=' ')
while t:
	t -= 1
	n = int(input())
	fun(n)


from sys import stdin, exit
input = stdin.readline

def i():
	return input()

def ii():
	return int(input())

def iis():
	return map(int, input().split())

def liis():
	return list(map(int, input().split()))

def print_array(a):
	print(' '.join(map(str, a)))
t = ii()
for _ in range(t):
	n = ii()
	for i in range(n):
		print(1, end=' ')
	print()


for i in range(int(input())):
	n = int(input())
	l = []
	for i in range(n):
		l.append(1)
	print(*l)


t = int(input())
c = []
for i in range(t):
	n = int(input())
	v = ''
	for k in range(n):
		v += str(1)
		v += ' '
	c.append(v)
for k in c:
	print(k)


import math
from sys import stdin
from collections import Counter, defaultdict, deque
input = stdin.readline
mod = pow(10, 9) + 7

def solve():
	n = int(input())
	l1 = [1] * n
	print(*l1)
for _ in range(int(input())):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	ls = [1] * n
	print(*ls)


import random
testcase = int(input())
for i in range(testcase):
	li = []
	for j in range(int(input())):
		li.append(1)
	print(*li, sep=' ')


import random
numberOfTestCase = int(input())
toBuilt = []
for i in range(numberOfTestCase):
	toBuilt.append(int(input()))

def compMatrix(longueur):
	comp = []
	for i in range(longueur):
		comp.append(1)
	return comp

def impMat(mat):
	for i in range(len(mat)):
		print(*mat[i])
impMat(list(map(compMatrix, toBuilt)))


for _ in range(int(input())):
	for _ in range(int(input())):
		print('1 ', end='')
	print()


import sys
input = sys.stdin.readline
INF = float('inf')
tc = int(input())
for _ in range(tc):
	n = int(input())
	for i in range(1, n + 1):
		print(1, end=' ')
	print()


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		rr.append(JA([1] * n, ' '))
	return JA(rr, '\n')
print(main())


for i in range(int(input())):
	n = int(input())
	lst = list()
	for i in range(n):
		lst.append(1)
	print(*lst, sep=' ')


z = int(input())
for h in range(z):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	s = int(input())
	a = ' '.join(['1' for x in range(s)])
	print(a)


tests = int(input())
for test in range(tests):
	n = int(input())
	print(*[1] * n)


__MULTITEST = True

def solve():
	n = int(input())
	a = [1] * n
	print(*a)
t = int(input()) if __MULTITEST else 1
for tt in range(t):
	solve()


n = int(input())
alist = []
for i in range(n):
	m = int(input())
	a = ' '.join(['1'] * m)
	alist.append(a)
for i in alist:
	print(i)


n_sets = int(input())
for i in range(n_sets):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


t = int(input())
while t:
	n = int(input())
	for x in range(n):
		print('1', end=' ')
	print()
	t -= 1


cases = int(input())
for i in range(cases):
	number = int(input())
	print('1 ' * number)


for i in range(int(input())):
	n = int(input())
	arr = []
	for i in range(n):
		arr.append(1)
	print(*arr)


t = int(input())
for x in range(t):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for i in range(int(input())):
	print(' '.join(['1' for i in range(int(input()))]))


tot = int(input().strip())
while tot > 0:
	n = int(input().strip())
	print(' '.join(['1' for _ in range(0, n)]))
	tot -= 1


for i in range(int(input())):
	arr = [1] * int(input())
	print(' '.join([str(elem) for elem in arr]))


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
for _ in range(inp()):
	n = inp()
	x = [1] * n
	print(*x)


t = int(input())
for i in range(t):
	n = int(input())
	b = [1] * n
	print(*b)


elem = int(input())
for i in range(elem):
	num = int(input())
	ar = []
	count = 1
	for j in range(num):
		ar.append(1)
	print(*ar)


import math
t = int(input())
for w in range(t):
	n = int(input())
	l = [1] * n
	print(*l)


t = int(input())
ans = [[]] * t
for i in range(t):
	n = int(input())
	a = [1] * n
	ans[i] = a
for i in range(t):
	print(' '.join(list(map(str, ans[i]))))


import sys
input = sys.stdin.readline
T = int(input())
for t in range(T):
	N = int(input())
	print(' '.join(map(str, [1 for i in range(N)])))


t = int(input())
for i in range(t):
	n = int(input())
	arr = ['1'] * n
	s = ' '.join(arr)
	print(s)


import os, io
from sys import stdout
import collections
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def divisors(n):
	i = 1
	result = []
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
		i += 1
	return result

def distance(xa, ya, xb, yb):
	return ((ya - yb) ** 2 + (xa - xb) ** 2) ** 0.5

def digitsSum(n):
	if n == 0:
		return 0
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r

def isValid(i, j, n, m):
	return i >= 0 and i < n and (j >= 0) and (j < m)

def print_grid(grid):
	for line in grid:
		print(' '.join(map(str, line)))

def kadane(a, size):
	max_so_far = 0
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def ceil(n, d):
	if n % d == 0:
		return n // d
	else:
		return n // d + 1

def _abs(a, b):
	return int(abs(a - b))

def evenodd(l):
	even = [e for e in l if e & 1 == 0]
	odd = [e for e in l if e & 1]
	return (even, odd)
t = int(input())
for _ in range(t):
	n = int(input())
	r = [1] * n
	print(' '.join(list(map(str, r))))


t = int(input())
for _ in range(t):
	n = int(input())
	print(' '.join(list(map(str, [1] * n))))


def main():
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()
t = int(input())
for i in range(t):
	main()


def solve(n):
	return [1] * n
t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	n = int(input())
	res = solve(n)
	print(' '.join((str(i) for i in res)))


t = int(input())
while t > 0:
	n = int(input())
	arr = [1] * n
	print(*arr, sep=' ')
	t -= 1


for x in range(int(input())):
	for y in range(int(input())):
		print('1', end=' ')
	print('')


def runCase():
	arraySize = int(input())
	print((arraySize * '1 ')[:-1])
cases = int(input())
for i in range(cases):
	runCase()


for _ in range(int(input())):
	n = int(input())
	res = [1 for i in range(n)]
	print(*res)


def main():
	t = int(input())
	ans = []
	for i in range(t):
		n = int(input())
		arr = [1] * n
		ans.append(arr)
	for i in ans:
		for j in i:
			print(j, end=' ')
		print()
main()


def full(n):
	return [1] * n
t = int(input())
for _ in range(t):
	n = int(input())
	print(*full(n))


cases = eval(input())
for _ in range(cases):
	nums = eval(input())
	arr = ''
	for _ in range(nums):
		arr += '1 '
	print(arr.strip())


for x in range(int(input())):
	l = int(input())
	s = '{} '.format(1)
	print(s * l)


for _ in range(int(input())):
	n = int(input())
	s = ''
	for i in range(n):
		s = s + '1' + ' '
	print(s)


from math import *
from collections import *
from bisect import *
import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	print(*[1] * n)


t = int(input())
for i in range(t):
	x = int(input())
	print('1 ' * x)


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	n = iinput()
	ans = [1] * n
	print(*ans)


def solve():
	n = int(input())
	ans = [1 for i in range(n)]
	print(*ans)
t = int(input())
for i in range(t):
	solve()


tests = int(input())
for t in range(tests):
	n = int(input())
	res = ['1' for i in range(n)]
	print(' '.join(res))


import sys
input = sys.stdin.readline

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
for i in range(int(input())):
	n = int(input())
	arr = ['1' for _ in range(n)]
	print(' '.join(arr))


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heapreplace, heappushpop

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
res = ['YES', 'NO']
test_case = ii()
while test_case:
	test_case -= 1
	n = ii()
	a = [1] * n
	print(*a)


cnt = int(input())
for _ in range(cnt):
	x = int(input())
	arr = []
	for i in range(0, x):
		arr.append(1)
	print(*arr)


T = int(input(''))
for i in range(T):
	num = int(input(''))
	for j in range(num):
		print(1, end=' ')
	print('')


t = int(input())
for k in range(t):
	n = int(input())
	a = [1 for i in range(n)]
	print(*a)


t = int(input())
for q in range(t):
	n = int(input())
	li = ['1' for i in range(n)]
	print(' '.join(li))


a = int(input())
for _ in range(a):
	b = int(input())
	t = []
	for i in range(b):
		t.append(1)
	print(*t)


import math

def dtod(a):
	s = ''
	while a != 0:
		s += str(a % 2)
		a = int(a / 2)
	return s[::-1]
n = int(input())
for i in range(n):
	a = int(input())
	print('1 ' * a)


import sys
t = int(input())
for i in range(t):
	n = int(input())
	print(*[1] * n)


t = int(input())
for i in range(t):
	x = int(input())
	k = []
	for i in range(x):
		k.append('1')
	print(' '.join(k))


t = int(input())
for tc in range(t):
	n = int(input())
	for x in range(n):
		print('1', end=' ')
	print('')


from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')
tests = lambda : range(1, int_in() + 1)
case_out = lambda i, o: out('Case #{}: {}'.format(i, o))

def solve(n):
	return [1] * n
for _ in tests():
	n = int_in()
	arr_out(solve(n))


from fractions import Fraction
import bisect
import os
import io
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
from queue import Queue

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
t = 1
t = iinput()
for _ in range(t):
	print('1 ' * iinput())


testcases = int(input())
seq = [i for i in range(1, 1001)]
for _ in range(testcases):
	n = int(input())
	r = ['1' for i in range(n)]
	print(' '.join(r))


T = int(input())
while T > 0:
	n = int(input())
	x = [1] * n
	print(*x)
	T -= 1


T = int(input())
for z in range(T):
	N = int(input())
	for i in range(N - 1):
		print(1, end=' ')
	print(1)


t = int(input())
i = 0
while i < t:
	n = int(input())
	r = []
	for j in range(n):
		r.append(1)
	for j in range(n - 1):
		print(r[j], end=' ')
	print(1)
	i += 1


n = int(input())
for i in range(n):
	a = int(input())
	result = ['1' for i in range(a)]
	print(' '.join(result))


from __future__ import division, print_function
from fractions import Fraction
import sys, bisect, heapq, copyreg, copy, statistics, os
from math import *
from collections import Counter, defaultdict, deque, OrderedDict
from itertools import combinations, permutations, accumulate
from bisect import bisect_left, bisect_right, bisect
from statistics import mode
from functools import reduce
from io import BytesIO, IOBase
from decimal import *
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def graph(vertex):
	return [[] for i in range(vertex + 1)]

def lcm(a, b):
	return a * b // gcd(a, b)

def most_frequent(List):
	return Counter(List).most_common(1)[0][0]

def most_common(List):
	return mode(List)

def chinese_remainder(a, p):
	prod = reduce(op.mul, p, 1)
	x = [prod // pi for pi in p]
	return sum((a[i] * pow(x[i], p[i] - 2, p[i]) * x[i] for i in range(len(a)))) % prod

def createMatrix(rowCount, colCount, dataList):
	mat = []
	for i in range(rowCount):
		rowList = []
		for j in range(colCount):
			if dataList[j] not in mat:
				rowList.append(dataList[j])
		mat.append(rowList)
	return mat

def readTree():
	v = int(inp())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	prime = []
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count

def digitsSum(n):
	if n == 0:
		return 0
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def kadane(a, size):
	max_so_far = 0
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def divisors(n):
	result = []
	for i in range(1, ceil(sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
	return result

def sumyilln(n):
	return n * (n + 1) // 2

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	for i in range(5, ceil(sqrt(n)) + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def isPowerOf2(n):
	while n % 2 == 0:
		n //= 2
	return True if n == 1 else False

def power2(n):
	k = 0
	while n % 2 == 0:
		k += 1
		n //= 2
	return k

def sqsum(n):
	return n * (n + 1) * (2 * n + 1) // 6

def cusum(n):
	return sumn(n) ** 2

def pa(a):
	for i in range(len(a)):
		print(a[i], end=' ')
	print()

def pm(a, rown, coln):
	for i in range(rown):
		for j in range(coln):
			print(a[i][j], end=' ')
		print()

def pmasstring(a, rown, coln):
	for i in range(rown):
		for j in range(coln):
			print(a[i][j], end='')
		print()

def isPerfectSquare(n):
	return pow(floor(sqrt(n)), 2) == n

def nC2(n, m):
	return n * (n - 1) // 2 % m

def modInverse(n, p):
	return pow(n, p - 2, p)

def ncrmodp(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def reverse(string):
	return ''.join(reversed(string))

def listtostr(s):
	return ' '.join([str(elem) for elem in s])

def binarySearch(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def isPalindrome(s):
	return s == s[::-1]

def gt(x, h, c, t):
	return (x * h + (x - 1) * c) / (2 * x - 1)

def CountFrequency(my_list):
	freq = {}
	for item in my_list:
		freq[item] = freq[item] + 1 if item in freq else 1
	return freq

def CountFrequencyasPair(my_list1, my_list2, freq):
	for item in my_list1:
		freq[item][0] = freq[item][0] + 1 if item in freq else 1
	for item in my_list2:
		freq[item][1] = freq[item][1] + 1 if item in freq else 1
	return freq

def binarySearchCount(arr, n, key):
	left = 0
	right = n
	mid = 0
	while left < right:
		mid = (right + left) // 2
		if arr[mid] == key:
			while mid + 1 < n and arr[mid + 1] == key:
				mid += 1
			break
		elif arr[mid] > key:
			right = mid
		else:
			left = mid + 1
	while mid > -1 and arr[mid] > key:
		mid -= 1
	return mid

def primes(n):
	(sieve, l) = ([True] * (n + 1), [])
	for p in range(2, n + 1):
		if sieve[p]:
			l.append(p)
			for i in range(p, n + 1, p):
				sieve[i] = False
	return l

def Next_Greater_Element_for_all_in_array(arr):
	(s, n, reta, retb) = (list(), len(arr), [], [])
	arr1 = [list([0, i]) for i in range(n)]
	for i in range(n - 1, -1, -1):
		while len(s) > 0 and s[-1][0] <= arr[i]:
			s.pop()
		if len(s) == 0:
			arr1[i][0] = -1
		else:
			arr1[i][0] = s[-1]
		s.append(list([arr[i], i]))
	for i in range(n):
		reta.append(list([arr[i], i]))
		retb.append(arr1[i][0])
	return (reta, retb)

class LRUCache:

	def __init__(self, capacity: int):
		self.cache = OrderedDict()
		self.capacity = capacity

	def get(self, key: int) -> int:
		if key not in self.cache:
			return -1
		else:
			self.cache.move_to_end(key)
			return self.cache[key]

	def put(self, key: int, value: int) -> None:
		self.cache[key] = value
		self.cache.move_to_end(key)
		if len(self.cache) > self.capacity:
			self.cache.popitem(last=False)
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def I():
	return inp()

def II():
	return int(inp())

def FI():
	return float(inp())

def SI():
	return list(str(inp()))

def MI():
	return map(int, inp().split())

def LI():
	return list(MI())

def MF():
	return map(float, inp().split())

def LF():
	return list(MF())
MOD = 10 ** 9 + 7
mod = 998244353
for _ in range(II()):
	pa([1] * II())


import math
import random
from collections import *
mod = 1000000007
r1 = lambda : int(input())
rm = lambda : map(int, input().split())
rms = lambda : map(str, input().split())
rls = lambda : list(rm())

def def_value():
	return 'nan'

def solve():
	test = r1()
	while test:
		test -= 1
		n = r1()
		ls = [1] * n
		print(*ls)
solve()


import sys, itertools
tc = int(sys.stdin.readline())
for _ in range(tc):
	n = int(sys.stdin.readline())
	ans = [1] * n
	print(' '.join(map(str, ans)))


z = int(input())
for _ in range(z):
	n = int(input())
	r = [1] * n
	print(*r)


import sys
import random
from sys import stdin, stdout

def get_ints():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()
n = int(input())
a = [0] * int(n)
for i in range(0, n):
	a[i] = int(input())
for i in range(0, n):
	s = 1
	for k in range(a[i]):
		stdout.write(str(str(s) + ' '))
	print()


import sys, math
import io, os
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
mod = int(1000000000.0) + 7
for i in range(int(data())):
	n = int(data())
	outl([1] * n)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
from decimal import Decimal
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def outa(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	n = int(data())
	answer = [1 for i in range(n)]
	outa(*answer)


from sys import stdin, stdout
for i in range(int(stdin.readline())):
	print(*[1 for i in range(int(stdin.readline()))])


for test in range(int(input())):
	n = int(input())
	a = [1 for i in range(n)]
	for i in a:
		print(i, end=' ')
	print()


test = int(input())
for i in range(test):
	ip = int(input())
	lst = [1] * ip
	for j in range(1, ip + 1):
		if j == ip:
			break
		if j == ip - 1:
			break
		if lst[j - 1] <= 1 and lst[j + 1 <= ip]:
			if lst[j - 1] + lst[j] == lst[j + 1]:
				lst[j] = lst[j] * ip
			else:
				pass
	print(*lst)


t = int(input())
for i in range(t):
	n = int(input())
	A = [1] * n
	print(*A)


a = int(input(''))
for i in range(0, a):
	i = int(input(''))
	o = []
	n = ''
	for b in range(0, i):
		i = 1
		o.append(i)
	for f in o:
		n += str(f) + ' '
	print(n)


import math
import sys
from sys import stdin
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = [1] * n
	print(*arr)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		N = int(input())
		ans = [1] * N
		print(*ans)
main()


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	result = [1 for i in range(n)]
	for num in result:
		print(num, end=' ')
	print()


for i in [0] * int(input()):
	ans = ''
	a = int(input())
	for i in range(a):
		ans += f'1 '
	print(ans)


n = int(input())
for i in range(n):
	num = int(input())
	for j in range(num):
		print(1, end=' ')
	print()


for k in range(int(input())):
	x = int(input())
	print('1 ' * x)


for t in range(int(input())):
	n = int(input())
	a = [1 for v in range(n)]
	print(*a)


import sys
from math import floor as fl
cont = sys.stdin.readlines()
cont = [i.strip('\n') for i in cont]
num = int(cont.pop(0)[0])
for i in cont:
	n = int(i)
	ret = ''
	for j in range(n):
		ret += '1 '
	print(ret)


import math
from collections import deque
from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	x = int(input())
	print(*[1] * x)


import math
import sys
input = sys.stdin.readline
t = int(input())
for cs in range(t):
	n = int(input())
	print(' '.join(['1'] * n))


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	n = ii1()
	res = [1] * n
	print(*res)


import math
import os
import random
import re
import sys
from collections import Counter

def solve():
	for _ in range(int(input())):
		n = int(input())
		l = [1] * n
		print(' '.join(map(str, l)))
solve()


def solve(n):
	return ' '.join(list(map(str, [1] * n)))
t = int(input())
for i_t in range(t):
	n = int(input())
	print(solve(n))


test = int(input())
for i in range(test):
	n = int(input())
	arr = [1 for i in range(n)]
	print(*arr)


t = int(input())
for z in range(t):
	n = int(input())
	arr = []
	for i in range(n):
		arr.append(int(1))
	print(*arr)


t = int(input())
for i in range(t):
	n = int(input())
	d = [1] * n
	print(*d)


l = int(input())
for i in range(l):
	n = int(input())
	for i in range(n):
		print('1 ', end='')
	print()


for _ in range(int(input())):
	x = int(input())
	a = []
	for i in range(x):
		a.append(1)
	for i in a:
		print(i, end=' ')
	print()


T = int(input().rstrip())
for test in range(T):
	n = int(input().rstrip())
	ans = [1] * n
	print(*ans)


ll = lambda : list(map(int, input().split()))
st = lambda : input()
v = lambda : map(int, input().split())
ii = lambda : int(input())
from collections import *
from math import *
from datetime import datetime
for _ in range(ii()):
	l = [1] * ii()
	print(*l)


import sys
import collections

def input():
	return sys.stdin.readline().rstrip()

def split_input():
	return [int(i) for i in input().split()]
tests = int(input())
for _ in range(tests):
	n = int(input())
	ans = [1] * n
	print(*ans, sep=' ')


t = int(input())
for ti in range(t):
	n = int(input())
	print('1 ' * n)


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))

def main():
	n = int(input())
	arr = [1 for i in range(n)]
	print(*arr)
t = int(input())
for _ in range(t):
	main()


x = int(input())
for a in range(x):
	y = int(input())
	arr = [1 for i in range(y)]
	print(*arr)


def main():
	ts = int(input())
	for _ in range(ts):
		n = int(input())
		o = ['1'] * n
		print(' '.join(o))
main()


t = int(input())
for t in range(t):
	n = int(input())
	list1 = []
	for i in range(n):
		list1.append(1)
	for i in range(len(list1)):
		if i != n - 1:
			print(1, end=' ')
		else:
			print(1)


from sys import stdin

def iinput():
	return int(stdin.readline())

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
t = iinput()
while t:
	t -= 1
	n = iinput()
	print(*[1] * n)


def driver():
	t = int(input())
	for i in range(t):
		solution()

def solution():
	n = int(input())
	l = [int(1) for i in range(n)]
	print(*l)
driver()


for s in range(int(input())):
	print('1 ' * int(input()))


import sys
import math
import collections
from sys import stdin, stdout, setrecursionlimit
import bisect as bs
setrecursionlimit(2 ** 20)
M = 998244353
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	for i in range(n):
		print(1, end=' ')
	print('')


for i in range(int(input())):
	n = int(input())
	print(*list([1] * n))


import sys
input = sys.stdin.readline
t = int(input())
memoization = [1] * 1000
for _ in range(t):
	n = int(input())
	print(*memoization[:n])


(T,) = map(int, input().split())
for _ in range(T):
	(N,) = map(int, input().split())
	print(*[1] * N)


cases = int(input())
answers = [] * 0
for problems in range(cases):
	n = int(input())
	ans = ''
	for i in range(n):
		if len(ans) == 0:
			ans = '1'
		else:
			ans += ' 1'
	answers.append(ans)
for answer in answers:
	print(answer)


t = int(input())
for hatt in range(t):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


def problem1():
	n = int(input())
	j = 1
	a = [1] * n
	print(*a)
cases = int(input())
for _ in range(cases):
	problem1()


cases = int(input())
for i in range(cases):
	n = int(input())
	arr = []
	for j in range(n):
		arr.append('1')
	print(' '.join(arr))


def li():
	return list(map(int, input().split()))

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())
for _ in range(ii()):
	n = ii()
	s = []
	for i in range(n):
		print('1', end=' ')
	print()


for _ in range(int(input())):
	a = int(input())
	sol = [str(1) for i in range(a)]
	print(' '.join(sol))


def read_list():
	return list(map(int, input().split(' ')))

def print_list(l):
	print(' '.join(map(str, l)))
N = int(input())
for _ in range(N):
	n = int(input())
	print_list([1] * n)


import sys
import os
import io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def solve():
	n = int(input())
	answer = ' '.join((str(1) for _ in range(n)))
	print(answer)
test_case = int(input())
for _ in range(test_case):
	solve()


import sys
input = sys.stdin.readline

def print(val):
	sys.stdout.write(str(val) + '\n')

def prog():
	for _ in range(int(input())):
		n = int(input())
		print('1 ' * n)
prog()


import sys

class IoTool:
	DEBUG = 0

	def _reader_dbg():
		with open('./input.txt', 'r') as f:
			lines = f.readlines()
		return iter(lines)
	reader = _reader_dbg() if DEBUG else iter(sys.stdin.read().split('\n'))
input = lambda : next(IoTool.reader)

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		print(*[1] * n)
main()


import sys
ii = lambda : sys.stdin.readline().strip()
idata = lambda : [int(x) for x in ii().split()]

def solve():
	n = int(ii())
	print('1 ' * n)
	return
for t in range(int(ii())):
	solve()


import sys
import math
from sys import stdin, stdout
from collections import deque, defaultdict
from math import ceil, floor, inf, sqrt, factorial, gcd, log2
from copy import deepcopy
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = int(1000000000.0 + 7)
for t in range(ii1()):
	n = ii1()
	for i in range(n):
		print(1, end=' ')
	print()


T = int(input())
while T > 0:
	n = int(input())
	ans = ''
	for i in range(0, n):
		ans += '1' + ' '
	print(ans)
	T -= 1


T = int(input())
for i in range(T):
	n = int(input())
	print('1 ' * (n - 1) + '1')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [1 for i in range(n)]
	print(' '.join([str(j) for j in arr]))


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	n = ii()
	a = []
	for i in range(0, n):
		a.append(1)
	print(*a)


import sys
input = sys.stdin.readline
Q = int(input())
Query = [int(input()) for _ in range(Q)]
for N in Query:
	ans = [1] * N
	print(*ans)


import sys
input = iter(sys.stdin.read().splitlines()).__next__
sys.setrecursionlimit(10000)
TC = int(input())
for tc in range(TC):
	N = int(input())
	print(' '.join(['1' for x in range(N)]))


read = lambda : map(int, input().split())
t = int(input())
res = ''
for i in range(t):
	n = int(input())
	res += ' '.join(map(str, [1] * n)) + '\n'
print(res)


for __ in range(int(input())):
	n = int(input())
	ar = [1] * n
	print(*ar)


import sys
import math
import collections
import heapq
import queue
import itertools
import functools
import operator
import time
readline = sys.stdin.readline
IPS = lambda : readline().rstrip()
IP = lambda : int(readline().rstrip())
MP = lambda : map(int, readline().split())
LS = lambda : list(map(int, readline().split()))

def solve():
	for _ in range(IP()):
		n = IP()
		for i in range(n):
			print(1, end=' ')
		print()
solve()


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	string = ''
	for x in range(n):
		string += '1 '
	print(string[0:-1])


for x in range(int(input())):
	n = int(input())
	for x in range(n):
		print(1, end=' ')
	print()


def readn():
	return int(input())

def readlist():
	return list(map(int, input().split()))

def readnos():
	return map(int, input().split())

def power(n):
	ans = 0
	while n > 0:
		ans += n % 10
		n = n // 10
	return ans
for _ in range(readn()):
	n = readn()
	a = []
	for i in range(n):
		a.append(1)
	print(*a, sep=' ')


from sys import stdin, exit, setrecursionlimit
from bisect import *
from collections import deque
setrecursionlimit(10000000)
from math import *
from collections import deque
input = stdin.readline
lmi = lambda : list(map(int, input().split()))
mi = lambda : map(int, input().split())
si = lambda : input().strip('\n')
ssi = lambda : input().strip('\n').split()
for _ in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


import sys
import bisect
import math as mt
input = sys.stdin.readline
t = int(input())
mod = 10 ** 9 + 7
for _ in range(t):
	n = int(input())
	print(1, end=' ')
	for i in range(n - 1):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	toPrint = []
	for _ in range(n):
		toPrint.append('1')
	print(' '.join(toPrint))


from sys import stdin, stdout
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	arr = [1] * n
	print(*arr)


for i in range(int(input())):
	x = int(input())
	one = '1 '
	one *= x
	one = one[:-1]
	print(one)


n = int(input())
arr = []
for i in range(n):
	arr.append(int(input()))
for j in range(len(arr)):
	for i in range(arr[j]):
		print(1, sep=' ', end='\n' if i == arr[j] - 1 and j != len(arr) - 1 else ' ')


import sys
from collections import deque
import heapq
input = lambda : sys.stdin.readline().strip()
ipnut = input
pprint = lambda x: print(' '.join(map(lambda t: str(t + 1), x)))

def mex():
	used = set(a)
	for i in range(n + 1):
		if i not in used:
			return i
for _ in range(int(input())):
	n = int(input())
	print('1 ' * n)


from sys import stdin, stdout
fi = stdin
fo = stdout
n_test = int(fi.readline())

def solve():
	n = int(fi.readline())
	a = ['1'] * n
	print(' '.join(a))
for i_test in range(n_test):
	solve()


def call():
	n = int(input())
	print('1 ' * n)
for _ in range(int(input())):
	call()


for i in [*open(0)][1:]:
	print('1 ' * int(i))


n = int(input())
i = 0
while i < n:
	x = int(input())
	j = 0
	num_list_1 = []
	while j < x:
		num_list_1.append('1')
		j += 1
	i += 1
	print(' '.join(num_list_1))


def series(n):
	(data, x) = ([1], 1)
	for _ in range(0, n - 1):
		x += 2
		if x > 1000:
			x = 1
		data.append(x)
	return data

def improved(n):
	return [1] * n
t = int(input())
for _ in range(t):
	n = int(input())
	for _ in range(n):
		print(1, end=' ')
	print()


for T in range(int(input())):
	n = int(input())
	arr = [1] * n
	print(*arr)


for u in range(int(input())):
	n = int(input())
	l = [1] * n
	print(*l)


input_length = int(input())
while input_length != 0:
	n = int(input())
	for i in range(1, n + 1):
		print(1, end=' ')
	if input_length != 1:
		print()
	input_length -= 1


t = int(input())
for i in range(t):
	n = int(input())
	dec = list('1' * n)
	print(*dec, sep=' ')


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	stack = []
	hashm = {}
	arr = []
	heapq.heapify(arr)
	for test in range(tests):
		n = inp()
		ans = []
		for i in range(n):
			ans.append(1)
		pr_list(ans)
main()


for _ in range(int(input())):
	n = int(input())
	arr = ['1'] * n
	s = ' '.join(arr)
	print(s)


from sys import stdin, stdout

def INPUT():
	return list((int(i) for i in stdin.readline().split()))

def inp():
	return stdin.readline()

def out(x):
	return stdout.write(x)
import math
for _ in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


def main():
	(n,) = map(int, input().split(' '))
	print(*[1] * n)
for _ in range(int(input())):
	main()


from sys import stdin, stdout
from collections import deque
import math
t = int(input())
for i in range(t):
	n = int(input())
	a = [1] * n
	print(*a)


from sys import stdin
for _ in range(int(stdin.readline())):
	print(*[1] * int(stdin.readline()))


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	for x in range(int(input())):
		print(1, end=' ')
	print()


import sys
input = lambda : sys.stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	n = INT()
	l = []
	for i in range(1, n + 1):
		l.append(1)
	print(*l)


r = int(input())
for i in range(r):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	arr = [1] * n
	for a in arr:
		print(a, end=' ')
	print()


arr = [1] * 1001
t = int(input())
for _ in range(t):
	n = int(input())
	print(' '.join(map(str, arr[:n])))


T = int(input())
for t in range(T):
	n = int(input())
	for i in range(n):
		print('1', end=' ')
	print()


c = int(input())
for x in range(c):
	l = int(input())
	print(' '.join(['1' for x in range(l)]))


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
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')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n
avl = AvlTree()

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for i in range(int(input())):
	n = int(input())
	l = [1] * n
	print(*l, sep=' ')


from math import *
from collections import *
from operator import itemgetter
import bisect
from heapq import *
i = lambda : input()
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
I = lambda : list(map(int, input().split()))
chrIdx = lambda x: ord(x) - 96
idxChr = lambda x: chr(96 + x)
t = ii()
for _ in range(t):
	n = ii()
	print('1 ' * n)


t = int(input())
for h in range(t):
	n = int(input())
	for i in range(n):
		print(i - i + 1, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	print(('1 ' * n).rstrip())


for _ in range(int(input())):
	x = int(input())
	print('1 ' * x)


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	n = sInt()
	a = [1]
	for i in range(n - 1):
		a.append(1)
	print(*a, sep=' ')


for _ in range(int(input())):
	t = int(input())
	l = []
	for i in range(t):
		l.append(int(1))
	print(*l)


import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	n = r()
	print('1 ' * n)


for i in range(int(input())):
	print(*[1] * int(input()), sep=' ')


test = int(input())
i = 1
while i <= test:
	n = int(input())
	for j in range(n):
		print(1, end=' ')
	print()
	i += 1


for i in range(int(input())):
	x = int(input())
	ans = [1] * x
	for i in ans:
		print(i, end=' ')
	print()


import sys
q = int(input())
for i in range(q):
	n = int(sys.stdin.readline())
	print('1 ' * n)


import math
import datetime
import collections
import statistics
import itertools

def is_prime(num):
	for i in range(2, int(math.sqrt(num)) + 1):
		if num % i == 0:
			return False
	return True

def input_list():
	ll = list(map(int, input().split(' ')))
	return ll
tc = int(input())
for _ in range(tc):
	n = int(input())
	x = [1] * n
	for i in x:
		print(i, end=' ')
	print(' ')


def examA():
	T = I()
	ans = []
	for _ in range(T):
		N = I()
		cur = [1 for _ in range(N)]
		ans.append(cur)
	for v in ans:
		print(' '.join(map(str, v)))
	return

def examB():
	T = I()
	ans = []
	for _ in range(T):
		cur = 0
		ans.append(cur)
	for v in ans:
		print(v)
	return

def examC():
	T = I()
	ans = []
	for _ in range(T):
		cur = 0
		ans.append(cur)
	for v in ans:
		print(v)
	return

def examD():
	ans = 0
	print(ans)
	return

def examE():
	ans = 0
	print(ans)
	return

def examF():
	ans = 0
	print(ans)
	return
from decimal import getcontext, Decimal as dec
import sys, bisect, heapq
from copy import deepcopy
from heapq import heappop, heappush, heapify
from collections import Counter, defaultdict, deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def I():
	return int(input())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def DI():
	return dec(input())

def LDI():
	return list(map(dec, sys.stdin.readline().split()))

def LSI():
	return list(map(str, sys.stdin.readline().split()))

def LS():
	return sys.stdin.readline().split()

def SI():
	return sys.stdin.readline().strip()
global mod, mod2, inf, alphabet, _ep
mod = 10 ** 9 + 7
mod2 = 998244353
inf = 10 ** 18
_ep = dec('0.000000000001')
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}
getcontext().prec = 28
sys.setrecursionlimit(2 * 10 ** 5)
examA()


import os
import sys
from io import BytesIO, IOBase
profile = 0
pypy = 1

def iin():
	return int(input())

def lin():
	return list(map(int, input().split()))

def main():
	T = iin()
	while T:
		T -= 1
		n = iin()
		print(*[1] * n)
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')
if pypy:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
if profile:
	import cProfile
	cProfile.run('main()')
else:
	main()


from sys import stdin

def input():
	return stdin.readline()
T = int(input())
for _ in range(T):
	n = int(input())
	an = ''
	for _ in range(n):
		an += '1 '
	print(an.strip())


for _ in range(int(input())):
	n = int(input())
	z = 1
	for _ in range(n):
		print(z, end=' ')
	print()


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key, lru_cache
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
M = mod = 10 ** 9 + 7

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip().split()]

def st():
	return str(input().rstrip())[2:-1]

def val():
	return int(input().rstrip())

def li2():
	return [str(i)[2:-1] for i in input().rstrip().split()]

def li3():
	return [int(i) for i in st()]
for _ in range(val()):
	n = val()
	l = [0] * n
	curr = 1
	for i in range(n):
		l[i] = curr
	print(*l)


from collections import defaultdict, Counter
from math import log, ceil, floor

def solve():
	n = int(input())
	print(*[1] * n)
t = 1
t = int(input())
for _ in range(t):
	solve()


T = int(input())
for i in range(T):
	n = int(input())
	for j in range(n):
		print('1', end=' ')
	print('')


for _ in range(int(input())):
	n = int(input())
	ans = [0] * n
	for i in range(n):
		ans[i] = 1
	print(*ans)


for _ in range(int(input())):
	N = int(input())
	for i in range(N):
		print(1, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	z = []
	for j in range(0, n):
		z.append('1')
	print(*z)


t = int(input())
for tt in range(0, t):
	n = int(input())
	x = [' ', '1'] * n
	x.remove(x[0])
	c = ''
	d = c.join(x)
	print(d)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
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 value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	n = Int()
	print(*[1 for i in range(n)])


count = int(input())
for i in range(count):
	leng = int(input())
	for _ in range(leng):
		print('1', end=' ')
	print('')


from collections import deque
for _ in range(int(input())):
	n = int(input())
	l = deque()
	i = 0
	k = 1
	while i != n:
		l.append(2 * k - 1)
		k = 2 * k - 1
		i += 1
	print(*l)


def solve(n):
	print(*[1] * n)
for _icase in range(int(input())):
	n = int(input())
	solve(n)


def ans(n):
	a = [str(1) for i in range(n)]
	s = ' '.join(a)
	return s
m = int(input())
for i in range(m):
	n = int(input())
	print(ans(n))


def solve(t):
	if not t:
		return
	n = int(input())
	for i in range(0, n):
		print(1, end=' ')
	print()
	solve(t - 1)
tests = int(input())
solve(tests)


tc = int(input())
for _ in range(tc):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


for i in range(int(input())):
	b = int(input())
	print('1 ' * b)


t = int(input())
for i in range(t):
	n = int(input())
	st = ' '.join(n * '1')
	print(st)


exec(int(input()) * "print(int(input())*'1 ');")


for x in range(int(input())):
	z = int(input())
	for i in range(z):
		print(1, end=' ')
	print()


import sys

def solve(n):
	return [1] * n
caseCount = int(next(sys.stdin))
for i in range(caseCount):
	n = int(next(sys.stdin))
	print(' '.join([str(i) for i in solve(n)]))


import sys, math, cmath, time
start_time = time.time()

def solve():
	n = inp()
	print(*[1] * n)

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a, qw):
	q = [0] * qw
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	b = [[0] * n for i in range(n)]
	for i in range(len(a)):
		for j in range(len(a)):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


ii = lambda : int(input())
from collections import *
for _ in range(ii()):
	n = ii()
	a = []
	for i in range(0, n):
		a.append(1)
	print(*a)


import sys
import math
from decimal import *

def I():
	return int(sys.stdin.readline())

def IL():
	return list(map(int, sys.stdin.readline().strip().split()))

def ILS():
	return list(map(str, sys.stdin.readline().strip().split()))

def solve():
	tt = I()
	for ii in range(tt):
		n = I()
		for i in range(n):
			print(1, end=' ')
		print()
		pass
solve()


import heapq as hq
from heapq import heappop, heappush
from collections import deque, defaultdict

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def subset_sum_count(arr, n, sum):
	dp = [[0 for _ in range(sum + 1)] for _ in range(n + 1)]
	for i in range(n + 1):
		for j in range(sum + 1):
			if j == 0:
				dp[i][j] = 1
			elif arr[i - 1] <= j:
				dp[i][j] = dp[i - 1][j - arr[i - 1]] + dp[i - 1][j]
			else:
				dp[i][j] = dp[i - 1][j]
	return dp[n][sum]

def prefix(a):
	pre = []
	pre.append(a[0])
	for i in range(1, len(a)):
		pre.append(pre[i - 1] + a[i])
	return pre

def binary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		mi = lo + (hi - lo) / 2
		if func(mi):
			hi = mi
		else:
			lo = mi
	return (lo + hi) / 2

def ternary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		lo_third = lo + (hi - lo) / 3
		hi_third = hi - (hi - lo) / 3
		if func(lo_third) < func(hi_third):
			lo = lo_third
		else:
			hi = hi_third
	return (lo + hi) / 2

def discrete_binary_search(func, lo, hi):
	while lo < hi:
		mi = lo + (hi - lo) // 2
		if func(mi):
			hi = mi
		else:
			lo = mi + 1
	return lo

def discrete_ternary_search(func, lo, hi):
	while lo <= hi:
		lo_third = lo + (hi - lo) // 3
		hi_third = lo + (hi - lo) // 3 + (1 if 0 < hi - lo < 3 else (hi - lo) // 3)
		if func(lo_third) < func(hi_third):
			lo = lo_third + 1
		else:
			hi = hi_third - 1
	return lo
	return -1

def right_rotate(a, s):
	return a[s:] + a[:s]

def dec_to_bin(x):
	return int(bin(x)[2:])

def str_to_integer_list(n):
	a = []
	for i in range(len(n)):
		a.append(int(n[i]))
	return a

def list_to_str(l):
	s = ''
	for i in l:
		s += str(i)
	return s

def dijkstra(s, N, E):
	visited = set()
	dist = {}
	for i in range(1, N + 1):
		dist[i] = 1 << 29
	queue = [(dist[i], i) for i in range(1, N + 1)]
	hq.heappush(queue, (0, s))
	dist[s] = 0
	while queue:
		(d, u) = hq.heappop(queue)
		if u in visited:
			continue
		for t in E[u]:
			(v, r) = t
			if dist[v] > d + r:
				dist[v] = d + r
				hq.heappush(queue, (dist[v], v))
		visited.add(u)
	return dist

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def dijkstra(n, graph, start):
	(dist, parents) = ([float('inf')] * n, [-1] * n)
	dist[start] = 0
	queue = [(0, start)]
	while queue:
		(path_len, v) = heappop(queue)
		if path_len == dist[v]:
			for (w, edge_len) in graph[v]:
				if edge_len + path_len < dist[w]:
					(dist[w], parents[w]) = (edge_len + path_len, v)
					heappush(queue, (edge_len + path_len, w))
	return (dist, parents)

def path(start, end, parent):
	path = [end]
	while path[-1] != start:
		path.append(parent[path[-1]])
	path.reverse()
	return path

def bfs(graph, start, goal):
	if start == goal:
		return [start]
	visited = {start}
	queue = deque([(start, [])])
	while queue:
		(current, path) = queue.popleft()
		visited.add(current)
		for neighbor in graph[current]:
			if neighbor == goal:
				return path + [current, neighbor]
			if neighbor in visited:
				continue
			queue.append((neighbor, path + [current]))
			visited.add(neighbor)
	return None
import os
import sys
from io import BytesIO, IOBase

def p(board):
	for i in range(8):
		s = ''
		for j in range(8):
			s += board[i][j]
		print(s)

def main():
	for x in range(inp()):
		n = inp()
		a = [1] * n
		print(*a)
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()


import math
T = int(input())
for t in range(T):
	n = int(input())
	for i in range(n):
		print('11', end=' ')
	print('')


for t in range(int(input())):
	N = int(input())
	l = []
	for i in range(N):
		l.append(1)
	print(*l)


n = int(input())
for i in range(n):
	c = int(input())
	for j in range(c):
		print(1, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	d = 1
	for i in range(n):
		print(d, end=' ')
	print()


import math
inf = int(10000000000.0)
t = int(input())
while t:
	t -= 1
	n = int(input())
	print(*[1] * n)


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(ri()):
		n = ri()
		a = [1] * n
		print(*a)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			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, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			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()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

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

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


import sys
input = sys.stdin.readline
scan_int = lambda : int(input())
scan_string = lambda : input().rstrip()
read_list = lambda : list(read())
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def solve():
	n = int(input())
	a = [1] * n
	print(*a)
for _ in range(int(input())):
	solve()


T = int(input())
while T != 0:
	T -= 1
	n = int(input())
	print(' '.join(['1'] * n))


for _ in range(int(input())):
	n = int(input())
	for _i in range(n):
		print(1, end=' ')
	print()


for o in range(int(input())):
	print(*[1] * int(input()))


t = int(input())
for u in range(t):
	n = int(input())
	a = [1 for i in range(n)]
	print(*a)


import os
from sys import stdin, stdout

def solve(tc):
	n = int(stdin.readline().strip())
	print(' '.join(['1' for i in range(n)]))
tcs = 1
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


T = int(input())
for _ in range(0, T):
	N = int(input())
	for i in range(0, N):
		print(1, end=' ')
	print()


for i in range(int(input())):
	print(str('1 ' * int(input()))[:-1])


import sys
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
t = inp()
for _ in range(t):
	n = inp()
	res = [1] * n
	print(*res)


from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


def nod(a, b):
	while a != b:
		(a, b) = (max(a, b), min(a, b))
		if a % b == 0:
			a -= (a // b - 1) * b
		else:
			a -= a // b * b
	return a
a = [1] * 1000
for i in range(int(input())):
	print(*a[:int(input())])


tt = int(input())
for loop in range(tt):
	n = int(input())
	ans = [1] * n
	print(*ans)


t = int(input())
for _ in range(t):
	n = int(input())
	g = [1] * n
	print(*g)


def answer(n):
	return [1] * n
t = int(input())
for i in range(t):
	n = int(input())
	print(*answer(n))


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	n = int(input())
	print(*[1] * n)


t = int(input())
for s in range(t):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


import math
t = int(input())
rez = []
for i in range(t):
	n = int(input())
	a = ''
	for j in range(n):
		a += '1 '
	rez.append(a)
for i in range(len(rez)):
	print(rez[i])


import os
import sys
from io import BytesIO, IOBase
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 RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')
from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		n = N()
		arr = [1] * n
		print(*arr)
main()


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	ans = []
	for _ in range(n):
		k = I()
		ans.append([1] * k)
	for x in ans:
		print(' '.join((str(a) for a in x)))
main()


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve():
	n = int(input())
	ls = [1] * n
	print(*ls)

def main():
	solve()
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


t = int(input())

def print_arr(n):
	print('1 ' * n)
while t > 0:
	n = int(input())
	print_arr(n)
	t -= 1