Andre has very specific tastes. Recently he started falling in love with arrays.

Andre calls an nonempty array $b$ good, if sum of its elements is divisible by the length of this array. For example, array $[2, 3, 1]$ is good, as sum of its elements — $6$ — is divisible by $3$, but array $[1, 1, 2, 3]$ isn't good, as $7$ isn't divisible by $4$. 

Andre calls an array $a$ of length $n$ perfect if the following conditions hold:   Every nonempty subarray of this array is good.  For every $i$ ($1 \le i \le n$), $1 \leq a_i \leq 100$. 

Given a positive integer $n$, output any perfect array of length $n$. We can show that for the given constraints such an array always exists.

An array $c$ is a subarray of an array $d$ if $c$ can be obtained from $d$ by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end.


-----Input-----

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 100$). Description of the test cases follows.

The first and only line of every test case contains a single integer $n$ ($1 \le n \le 100$).


-----Output-----

For every test, output any perfect array of length $n$ on a separate line. 


-----Example-----
Input
3
1
2
4

Output
24
19 33
7 37 79 49



-----Note-----

Array $[19, 33]$ is perfect as all $3$ its subarrays: $[19]$, $[33]$, $[19, 33]$, have sums divisible by their lengths, and therefore are good.

Source: codeforces | Difficulty: EASY
Tags: Implementation

Constructive algorithms


Solutions:
t = int(input())

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


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


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


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


from sys import stdin

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


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


import sys
input = sys.stdin.buffer.readline
ans = '1 ' * 100
t = int(input())
for _ in range(t):
	n = int(input())
	print(ans[:2 * n - 1])


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


import random
t = int(input())
while t:
	n = int(input())
	a = []
	for i in range(n):
		a.append(2)
	for i in a:
		print(i, end=' ')
	print()
	t -= 1


tt = int(input())
while tt > 0:
	n = int(input())
	print('1 ' * n)
	tt -= 1


def str_list(s, char):
	output_list = []
	collector = ''
	for i in range(len(s)):
		if s[i] == char:
			if collector:
				output_list.append(int(collector))
				collector = ''
		else:
			collector += s[i]
	output_list.append(int(collector))
	return output_list

def merge_sort(l):

	def merge(l_1, l_2):
		(i, j) = (0, 0)
		output_list = []
		while i < len(l_1) and j < len(l_2):
			if l_1[i][0] < l_2[j][0]:
				output_list.append(l_1[i])
				i += 1
			else:
				output_list.append(l_2[j])
				j += 1
		if i == len(l_1):
			output_list += l_2[j:]
		elif j == len(l_2):
			output_list += l_1[i:]
		return output_list

	def sorts(l):
		if len(l) < 2:
			return l
		else:
			mid = len(l) // 2
			left = sorts(l[:mid])
			right = sorts(l[mid:])
		return merge(left, right)
	return sorts(l)

def merge_sort2(l):

	def merge(l_1, l_2):
		(i, j) = (0, 0)
		output_list = []
		while i < len(l_1) and j < len(l_2):
			if l_1[i][1] < l_2[j][1]:
				output_list.append(l_1[i])
				i += 1
			else:
				output_list.append(l_2[j])
				j += 1
		if i == len(l_1):
			output_list += l_2[j:]
		elif j == len(l_2):
			output_list += l_1[i:]
		return output_list

	def sorts(l):
		if len(l) < 2:
			return l
		else:
			mid = len(l) // 2
			left = sorts(l[:mid])
			right = sorts(l[mid:])
		return merge(left, right)
	return sorts(l)

def str_list_with_str(s, char):
	output_list = []
	collector = ''
	for i in range(len(s)):
		if s[i] == char:
			if collector:
				output_list.append(collector)
				collector = ''
		else:
			collector += s[i]
	output_list.append(collector)
	return output_list

def list_str(l, char):
	output_str = ''
	for i in range(len(l) - 1):
		output_str += str(l[i]) + char
	output_str += str(l[len(l) - 1])
	return output_str

def find_max(l, i, current_max):
	if i == len(l):
		return current_max
	else:
		if current_max < l[i]:
			current_max = l[i]
		return find_max(l, i + 1, current_max)

def simple_find_min_max(l):
	current_max = l[0]
	current_min = l[0]
	for i in l:
		if current_max < i:
			current_max = i
		if current_min > i:
			current_min = i
	return (current_min, current_max)

def simple_find_min(l):
	current_max = l[0]
	for i in l:
		if current_max > i:
			current_max = i
	return current_max

def sum(l):
	sum = 0
	for i in l:
		sum += i
	return sum

def main_function():
	test_cases = range(int(input()))
	output_list = []
	for test_case in test_cases:
		n = int(input())
		array = list_str([2 for i in range(1, n + 1)], ' ')
		output_list.append(array)
	return list_str(output_list, '\n')
print(main_function())


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


from collections import Counter
import string
import math
import sys
from fractions import Fraction

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

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))

def printDivisors(n):
	divisors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				divisors.append(i)
			else:
				divisors.extend((i, n // i))
		i = i + 1
	return divisors

def countTotalBits(num):
	binary = bin(num)[2:]
	return len(binary)

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
mod = 10 ** 9 + 7

def comp(x):
	return x[1]

def binary_search(arr, x):
	low = 0
	high = len(arr) - 1
	mid = 0
	while low <= high:
		mid = (high + low) // 2
		if arr[mid] < x:
			low = mid + 1
		elif arr[mid] > x:
			high = mid - 1
		else:
			return mid
	return -1
t = vary(1)
for _ in range(t):
	n = vary(1)
	print(*[1] * n)


t = int(input())
i = 0
while i < t:
	n = int(input())
	l = [1] * n
	for j in l:
		print(j, end=' ')
	i += 1


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


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


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


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


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


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


import sys

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

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

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

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

def get_print_int(x):
	sys.stdout.write(str(x))

def get_print(x):
	sys.stdout.write(str(x))

def solve():
	for _ in range(get_int()):
		n = get_int()
		get_print(' '.join(map(str, [1] * n)))
		get_print('\n')
solve()


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


import sys
max_int = 1000000001
min_int = -max_int
t = int(input())
for _t in range(t):
	n = int(sys.stdin.readline())
	print(' '.join(['1'] * n))


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


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


from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
import sys
input = sys.stdin.readline

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

def st():
	return input().rstrip('\n')

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

def ma():
	return list(map(int, input().split()))
t = inp()
while t:
	t -= 1
	n = inp()
	print(*[1] * n)


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


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


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


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


from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, itertools, math
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
sqrt = math.sqrt

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

def LF():
	return list(map(float, input().split()))

def LI_():
	return list(map(lambda x: int(x) - 1, input().split()))

def II():
	return int(input())

def IF():
	return float(input())

def S():
	return input().rstrip()

def LS():
	return S().split()

def IR(n):
	res = [None] * n
	for i in range(n):
		res[i] = II()
	return res

def LIR(n):
	res = [None] * n
	for i in range(n):
		res[i] = LI()
	return res

def FR(n):
	res = [None] * n
	for i in range(n):
		res[i] = IF()
	return res

def LIR(n):
	res = [None] * n
	for i in range(n):
		res[i] = IF()
	return res

def LIR_(n):
	res = [None] * n
	for i in range(n):
		res[i] = LI_()
	return res

def SR(n):
	res = [None] * n
	for i in range(n):
		res[i] = S()
	return res

def LSR(n):
	res = [None] * n
	for i in range(n):
		res[i] = LS()
	return res
mod = 1000000007
inf = float('INF')

def solve():
	t = II()
	for _ in range(t):
		a = II()
		x = '1' * a
		print(' '.join(x))
	return
solve()


from sys import *
for _ in range(int(input())):
	n = int(stdin.readline())
	m = []
	for i in range(n):
		m.append(str(2))
	stdout.write(str(' '.join(m)) + '\n')


import sys
import os.path
from collections import *
import math
import bisect
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	for i in range(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()


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


t = int(input())
for i in range(t):
	length = int(input())
	outputlist = [length] * length
	print(' '.join(map(str, outputlist)))


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


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


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


t = int(input())
for p in range(t):
	ans = [str(2) for i in range(int(input()))]
	print(' '.join(ans))


import sys
import os.path
if os.path.exists('input_file.txt'):
	sys.stdin = open('input_file.txt', 'r')
	sys.stdout = open('output_file.txt', 'w')
mod = 1000000007

def factorial(a):
	ans = 1
	for i in range(1, a + 1):
		ans = ans * i % mod
	return ans
for _ in range(int(input())):
	n = int(input())
	for i in range(n):
		print(1, end=' ')
	print()


from math import *
from collections import deque
from copy import deepcopy
import sys

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

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

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

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

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

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

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

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

def printlist(a):
	print(' '.join((str(a[i]) for i in range(len(a)))))

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
t = int(input())
for _ in range(t):
	n = int(input())
	for i in range(n):
		print(n, end=' ')
	print()


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


from __future__ import division, print_function
import os, sys
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

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

def fi():
	return float(input())

def si():
	return input()

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

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

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

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

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

def lcm(x, y):
	return x * y // gcd(x, y)
mod = 1000000007

def modInverse(b, m):
	g = gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def modu(a, b, m):
	a = a % m
	inv = modInverse(b, m)
	if inv == -1:
		return -999999999
	else:
		return inv * a % m
from math import log, sqrt, factorial, cos, tan, sin, radians, floor, ceil
import bisect
from decimal import *
getcontext().prec = 8
abc = 'abcdefghijklmnopqrstuvwxyz'
pi = 3.141592653589793

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


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


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


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


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	ans = ''
	for item in range(0, n):
		ans += '1' + ' '
	print(ans)


test = int(input())
for i in range(test):
	long = int(input())
	a = [2] * long
	for j in range(long):
		print('%i' % a[j], end=' ')


def perf_arr(n):
	arr = []
	for i in range(1, n + 1):
		if i * n < 100:
			arr.append(n * 1)
		else:
			arr.append(n)
	return arr
for _ in range(int(input())):
	n = int(input())
	arr = perf_arr(n)
	for i in arr:
		print(i, end=' ')
	print()


masukan = int(input())
masukanl = []
for i in range(0, masukan):
	x = int(input())
	for j in range(0, x):
		if j != x - 1:
			print(1, end=' ')
		else:
			print(1)


from sys import stdin
input = stdin.readline

def A():
	t = int(input())
	for __ in range(t):
		n = int(input())
		print(*[1] * n)

def B():
	t = int(input())
	for __ in range(t):
		_ = 0

def C():
	t = int(input())
	for __ in range(t):
		_ = 0

def D():
	t = int(input())
	for __ in range(t):
		_ = 0
A()


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


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


from __future__ import division, print_function
import os
import sys
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

def solve():
	a = int(input())
	print(('1 ' * a).strip())

def main():
	testcases = 1
	testcases = int(input())
	for _ in range(testcases):
		solve()
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 _ in range(T):
	n = int(input())
	A = [2] * n
	print(*A)


for i in range(0, int(input())):
	print('1 ' * int(input()))


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


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


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


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


import sys
input = sys.stdin.buffer.readline

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


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


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


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


from collections import defaultdict as dd, deque as dq, Counter as c
from math import factorial as f, ceil, gcd, sqrt

def it():
	return int(input())

def mp():
	return map(int, input().split())
for _ in range(it()):
	a = it()
	print('1 ' * a)


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')
from math import gcd, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

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

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	n = int(input())
	print(*[1] * n)


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


from sys import stdin

class Input:

	def __init__(self):
		self.it = iter(stdin.readlines())

	def line(self):
		return next(self.it).strip()

	def array(self, sep=' ', cast=int):
		return list(map(cast, self.line().split(sep=sep)))

def testcases(unknown=False):
	inpt = Input()

	def testcases_decorator(func):
		(cases,) = [float('Inf')] if unknown else inpt.array()
		while cases > 0:
			try:
				func(inpt)
				cases -= 1
			except StopIteration:
				break
	return testcases_decorator

@testcases()
def solve(inpt):
	(n,) = inpt.array()
	print(*[1] * n)


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


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


s = int(input())
a = []
for i in range(s):
	i = int(input())
	a.append(i)
for i in range(len(a)):
	d = [1] * a[i]
	print(' '.join(map(str, d)))


t = int(input())
for i in range(t):
	n = int(input())
	new_arr = [n for i in range(n)]
	print(' '.join(map(str, new_arr)))


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


cases = int(input())
for t in range(cases):
	a = int(input())
	print(*[a] * a)


for i in range(int(input())):
	print((' 1' * int(input())).strip())


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


n = int(input())
for _ in range(n):
	a = []
	p = int(input())
	if p == 1:
		a.append(2)
	elif p % 2 == 0:
		for k in range(p):
			a.append(2)
	else:
		for k in range(p):
			a.append(1)
	print(*a)


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


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


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


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


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


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


lst = []
temp = []
for _ in range(int(input())):
	n = int(input())
	temp = [1 for x in range(n)]
	lst += [temp]
for i in lst:
	print(*i)


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	b = int(input())
	ans = [1] * b
	print(*ans)


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


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


for y in range(int(input())):
	a = int(input())
	new = []
	for t in range(a):
		new.append(1)
	print(*new, end='\n')


from collections import Counter as C, defaultdict as D, deque as Q
from operator import itemgetter as I
from itertools import product as P
from bisect import bisect_left as BL, bisect_right as BR, insort as INSORT
from heapq import heappush as HPUSH, heappop as HPOP
from math import floor as MF, ceil as MC, gcd as MG, factorial as F, sqrt as SQRT, inf as INFINITY, log as LOG
from sys import stdin, stdout
INPUT = stdin.readline
PRINT = stdout.write
L = list
M = map

def player1():
	print('')

def player2():
	print('')

def isPrime(n):
	for i in range(2, MC(SQRT(n)) + 1):
		if n % i == 0:
			return False
	return True

def factors(x):
	ans = []
	for i in range(1, MC(SQRT(x)) + 1):
		if x % i == 0:
			ans.append(i)
			if x % (x // i) == 0:
				ans.append(x // i)
	return ans

def checkPath(source, destination, g):
	visited = [0] * 101
	q = Q()
	q.append(source)
	visited[source] = 1
	while q:
		node = q.popleft()
		if node == destination:
			return 1
		for v in g[node]:
			if not visited[v]:
				q.append(v)
				visited[v] = 1
	return 0

def makeSegments(s, n):
	seg = []
	(i, j) = (0, 0)
	while i < n and j < n:
		if s[i] == s[j]:
			j += 1
		else:
			seg.append((i, j - 1))
			i = j
	seg.append((i, j - 1))
	return seg

def main():
	for _ in range(int(INPUT())):
		n = int(INPUT())
		for i in range(n):
			PRINT('%d ' % 1)
		PRINT('\n')
main()


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


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


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


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		n = int(input())
		yield ' '.join([str(x) for x in [1] * n])
t = int(input())
ans = gift()
print(*ans, sep='\n')


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


from bisect import *
from collections import *
from math import gcd, ceil, sqrt, floor, inf
from heapq import *
from itertools import *
from operator import add, mul, sub, xor, truediv, floordiv
from functools import *
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())
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
farr = [1]
ifa = []

def fact(x, mod=0):
	if mod:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr) % mod)
	else:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr))
	return farr[x]

def ifact(x, mod):
	global ifa
	ifa.append(pow(farr[-1], mod - 2, mod))
	for i in range(x, 0, -1):
		ifa.append(ifa[-1] * i % mod)
	ifa = ifa[::-1]

def per(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return fact(i) // fact(i - j)
	return farr[i] * ifa[i - j] % mod

def com(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return per(i, j) // fact(j)
	return per(i, j, mod) * ifa[j] % mod

def catalan(n):
	return com(2 * n, n) // (n + 1)

def linc(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t > f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rinc(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t < f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def ldec(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t < f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rdec(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t > f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def binfun(x):
	c = 0
	for w in arr:
		c += ceil(w / x)
	return c

def lowbit(n):
	return n & -n

def inverse(a, m):
	a %= m
	if a <= 1:
		return a
	return (1 - inverse(m, a) * m) // a % m

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class DSU:

	def __init__(self, n):
		self.c = [-1] * n

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def find(self, x):
		if self.c[x] < 0:
			return x
		self.c[x] = self.find(self.c[x])
		return self.c[x]

	def union(self, u, v):
		(u, v) = (self.find(u), self.find(v))
		if u == v:
			return False
		if self.c[u] < self.c[v]:
			(u, v) = (v, u)
		self.c[u] += self.c[v]
		self.c[v] = u
		return True

	def size(self, x):
		return -self.c[self.find(x)]

class UFS:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return prime

def dij(s, graph):
	d = {}
	d[s] = 0
	heap = [(0, s)]
	seen = set()
	while heap:
		(dis, u) = heappop(heap)
		if u in seen:
			continue
		for v in graph[u]:
			if v not in d or d[v] > d[u] + graph[u][v]:
				d[v] = d[u] + graph[u][v]
				heappush(heap, (d[v], v))
	return d

def GP(it):
	return [(ch, len(list(g))) for (ch, g) in groupby(it)]

class DLN:

	def __init__(self, val):
		self.val = val
		self.pre = None
		self.next = None
t = N()
for i in range(t):
	n = N()
	ans = [1] * n
	print(*ans)


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


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


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


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


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


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


from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from functools import cmp_to_key
from heapq import *
from math import gcd, factorial, floor, ceil, sqrt
from copy import deepcopy
from collections import deque
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))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

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 list(map(int, inp().split()))

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

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

def google(p):
	print('Case #' + str(p) + ': ', end='')

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

def power(x, y, p):
	y %= p - 1
	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 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
inf = pow(10, 20)
mod = 10 ** 9 + 7

def solve(case):
	n = int(inp())
	ans = [1] * n
	print(' '.join((str(ans[i]) for i in range(n))))
testcase(int(inp()))


import sys
from math import ceil, factorial, gcd
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify
MOD = 10 ** 9 + 7
INF = float('inf')
rl = lambda : list(map(int, sys.stdin.readline().split()))
for _ in range(int(input())):
	n = int(input())
	print(*[1] * n)


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


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


t = int(input())
res = []
for x in range(t):
	n = int(input())
	if n == 1:
		res.append(['33'])
	else:
		r = []
		i = n + 1
		while True:
			if i % n == 0 and i / n <= 100:
				for j in range(0, n):
					r.append(str(i // n))
				break
			i += 1
		res.append(r)
for x in range(len(res)):
	print(' '.join(res[x]))


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
sys.setrecursionlimit(100000000)
ii = lambda : int(input())
si = lambda : input()
jn = lambda x, l: x.join(map(str, l))
sl = lambda : list(map(str, input().strip()))
mi = lambda : map(int, input().split())
mif = lambda : map(float, input().split())
lii = lambda : list(map(int, input().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
mod = 1000000007
for _ in range(ii()):
	n = ii()
	for i in range(n):
		print(1, end=' ')
	print()


import os
import sys
from io import BytesIO, IOBase
import math
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')
for _ in range(int(input()) if True else 1):
	n = int(input())
	l = [1] * n
	print(*l)


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


from sys import stdin
from collections import Counter
from math import sqrt, factorial, log10, log, floor, ceil
from itertools import permutations, combinations, combinations_with_replacement
input = stdin.readline

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

def lis():
	return list(map(str, input().split()))

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

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

def inps():
	return str(input().strip())

def pr(n):
	return stdout.write(str(n) + '\n')
INF = float('inf')

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


T = int(input())
for t in range(T):
	n = int(input())
	a = [1] * n
	print('{}'.format(' '.join((str(s) for s in a))))


from sys import stdin, stdout
from collections import *
from math import gcd, floor, ceil
st = lambda : list(stdin.readline().strip())
li = lambda : list(map(int, stdin.readline().split()))
mp = lambda : map(int, stdin.readline().split())
inp = lambda : int(stdin.readline())
pr = lambda n: stdout.write(str(n) + '\n')
mod = 1000000007
INF = float('inf')

def solve():
	n = inp()
	for i in range(n):
		print(1, end=' ')
	print()
for _ in range(inp()):
	solve()


import math
import random
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
import threading
from collections import defaultdict
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

class SegmentTree1:

	def __init__(self, data, default=2 ** 32, 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=2 ** 30 - 1, 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))
			return
		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))
			return
		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))
			return
		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 binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

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

class TrieNode:

	def __init__(self):
		self.children = [None] * 26
		self.isEndOfWord = False

class Trie:

	def __init__(self):
		self.root = self.getNode()

	def getNode(self):
		return TrieNode()

	def _charToIndex(self, ch):
		return ord(ch) - ord('a')

	def insert(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				pCrawl.children[index] = self.getNode()
			pCrawl = pCrawl.children[index]
		pCrawl.isEndOfWord = True

	def search(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				return False
			pCrawl = pCrawl.children[index]
		return pCrawl != None and pCrawl.isEndOfWord

class Node:

	def __init__(self, data):
		self.data = data
		self.count = 0
		self.left = None
		self.right = None

class BinaryTrie:

	def __init__(self):
		self.root = Node(0)

	def insert(self, pre_xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = pre_xor & 1 << i
			if val:
				if not self.temp.right:
					self.temp.right = Node(0)
				self.temp = self.temp.right
				self.temp.count += 1
			if not val:
				if not self.temp.left:
					self.temp.left = Node(0)
				self.temp = self.temp.left
				self.temp.count += 1
		self.temp.data = pre_xor

	def query(self, xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = xor & 1 << i
			if not val:
				if self.temp.left and self.temp.left.count > 0:
					self.temp = self.temp.left
				elif self.temp.right:
					self.temp = self.temp.right
			elif self.temp.right and self.temp.right.count > 0:
				self.temp = self.temp.right
			elif self.temp.left:
				self.temp = self.temp.left
			self.temp.count -= 1
		return xor ^ self.temp.data
for ik in range(int(input())):
	n = int(input())
	a = [1] * n
	print(*a)


def zip_sorted(a, b):
	(a, b) = zip(*sorted(zip(a, b)))
	sorted(zip(a, b), key=lambda x: x[1])
	return (a, b)
import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
S = lambda : list(map(str, input().split()))
(t,) = I()
for t1 in range(t):
	(n,) = I()
	print(*[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, end='\n'):
	sys.stdout.write(str(var) + end)

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())
	outa(*[1] * n)


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


from sys import stdin, stdout
import heapq as hq
from collections import defaultdict
t = int(input())
for tc in range(t):
	n = int(stdin.readline())
	res = n * ['1']
	stdout.write(str(' '.join(res)) + '\n')


import math
import sys
import string
tc = int(input())
ans = []
while tc > 0:
	n = int(input())
	while n > 0:
		sys.stdout.write('1 ')
		n -= 1
	tc -= 1
	print('')


import sys
input = sys.stdin.readline
from itertools import groupby
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())

def HalfDead():
	for _ in range(I()):
		a = [1] * I()
		print(*a)
HalfDead()


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush, heappop, heapify
from itertools import permutations, combinations
mod = int(1000000000.0) + 7
ip = lambda : int(stdin.readline())
inp = lambda : list(map(int, stdin.readline().split()))
ips = lambda : stdin.readline().rstrip()
out = lambda x: stdout.write(str(x) + '\n')
t = ip()
for _ in range(t):
	n = ip()
	ans = [1] * n
	print(*ans)


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 for i in range(n)]
	print(*x)


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


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


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

def solve_(num):
	return [1] * num

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	pass
ONLINE_JUDGE = False
if os.path.exists('input.txt'):
	ONLINE_JUDGE = True
if ONLINE_JUDGE:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def console(*args):
		pass

def solve(*args):
	if not ONLINE_JUDGE:
		console('----- solving ------')
		console(*args)
		console('----- ------- ------')
	return solve_(*args)
if True:
	inp = iter(sys.stdin.buffer.readlines())
	input = lambda : next(inp)
else:
	input = sys.stdin.buffer.readline
for case_num in range(int(input())):
	k = int(input())
	res = solve(k)
	print(*res)


inp = lambda : int(input())
strl = lambda : list(input().strip())
seq = lambda : list(map(int, input().strip().split()))

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

def main():
	t = inp()
	for _ in range(t):
		n = inp()
		result = f(n)
		print(*result)
main()


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
import string
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=2):
	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):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

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()):
	print('1 ' * ii())


import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right
import time
from types import GeneratorType
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		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 = self.os.read(self._fd, max(self.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 = self.os.read(self._fd, max(self.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:
			self.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 as dd, deque as dq, Counter as dc
import math, string

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())

def getMat(n):
	return [getInts() for _ in range(n)]
MOD = 10 ** 9 + 7

def solve():
	N = getInt()
	ans = [1] * N
	print(*ans)
	return
for _ in range(getInt()):
	solve()


from collections import defaultdict
linp = lambda : list(map(int, input().split()))
iinp = lambda : int(input())
tinp = lambda : map(int, input().split())
rinp = lambda : range(int(input()))
dct = lambda : defaultdict(lambda : 0)
from collections import Counter
from math import ceil
for _ in rinp():
	n = iinp()
	s = '1 ' * n
	print(s[:-1])


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


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


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


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


import sys, collections, math, itertools, random
INF = sys.maxsize

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())
	print(*[1] * n)


a = int(input())
string = ''
for _ in range(a):
	b = int(input())
	for x in range(b):
		string += '1 '
	print(string)
	string = ''


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


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


import sys
from math import *
from collections import Counter as cc, defaultdict as df, OrderedDict as od
inf = float('inf')

def counter(l):
	return dict(cc(l))

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

def yes():
	print('YES')

def no():
	print('NO')

def so(x):
	return {k: v for (k, v) in sorted(x.items(), key=lambda item: item[1])}

def rev(l):
	return list(reversed(l))

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

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

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

def i1():
	return sys.stdin.readline().strip()
t = ini()
for _ in range(t):
	n = ini()
	print(*[1 for i in range(n)])


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


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


for _ in range(int(input())):
	n = int(input())
	ans = []
	while len(ans) != n:
		ans.append(3)
	print(*ans)


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


import sys
import time
import os
from math import sqrt, log, log2, log10, gcd, floor, pow, sin, cos, tan, pi, inf, factorial
from copy import copy, deepcopy
from sys import exit, stdin, stdout
from collections import Counter, defaultdict, deque
from itertools import permutations
import heapq
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007
iinp = lambda : int(sys.stdin.readline())
inp = lambda : sys.stdin.readline().strip()
strl = lambda : list(inp().strip().split(' '))
intl = lambda : list(map(int, inp().split(' ')))
mint = lambda : map(int, inp().split())
flol = lambda : list(map(float, inp().split(' ')))
flush = lambda : stdout.flush()

def permute(nums):

	def fun(arr, nums, cur, v):
		if len(cur) == len(nums):
			arr.append(cur.copy())
		i = 0
		while i < len(nums):
			if v[i]:
				i += 1
				continue
			else:
				cur.append(nums[i])
				v[i] = 1
				fun(arr, nums, cur, v)
				cur.pop()
				v[i] = 0
				i += 1
		return arr
	res = []
	nums.sort()
	v = [0] * len(nums)
	return fun(res, nums, [], v)

def subsets(res, index, arr, cur):
	res.append(cur.copy())
	for i in range(index, len(arr)):
		cur.append(arr[i])
		subsets(res, i + 1, arr, cur)
		cur.pop()
	return res

def sieve(N):
	root = int(sqrt(N))
	primes = [1] * (N + 1)
	(primes[0], primes[1]) = (0, 0)
	for i in range(2, root + 1):
		if primes[i]:
			for j in range(i * i, N + 1, i):
				primes[j] = 0
	return primes

def bs(arr, l, r, x):
	if x < arr[0] or x > arr[len(arr) - 1]:
		return -1
	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 isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	p = int(sqrt(n))
	for i in range(5, p + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def solve():
	n = iinp()
	arr = ['1 ' * n]
	print(*arr)
start_time = time.time()
for _ in range(iinp()):
	solve()


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


import io
import os
from collections import Counter, defaultdict, deque

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

def __starting_point():
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
	TC = int(input())
	for tc in range(1, TC + 1):
		(N,) = [int(x) for x in input().split()]
		ans = solve(N)
		print(ans)
__starting_point()


for i in range(int(input())):
	n = int(input())
	s = ' '
	m = [1 for z in range(n)]
	m = list(map(str, m))
	print(s.join(m))


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


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


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


import sys
from copy import *
from bisect import *
from math import gcd, ceil, sqrt
from itertools import permutations as prm, product

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')
di = [[-1, 0], [1, 0], [0, 1], [0, -1]]

def string(s):
	return ''.join(s)

def fori(n):
	return [fi() for i in range(n)]

def inc(d, c, x=1):
	d[c] = d[c] + x if c in d else x

def bo(i):
	return ord(i) - ord('A')

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

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

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

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

def gtc(tc, ans):
	print('Case #' + str(tc) + ':', ans)

def cil(n, m):
	return n // m + int(n % m > 0)

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

def pro(a):
	return reduce(lambda a, b: a * b, a)

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 isvalid(i, j, n, m):
	return 0 <= i < n and 0 <= j < m

def bo(i):
	return ord(i) - ord('a')

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)
t = fi()
while t > 0:
	t -= 1
	n = fi()
	print(*[1] * n)


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


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


a = int(input())
l = []
for i in range(a):
	l.append(int(input()))
for i in range(a):
	z = []
	for j in range(l[i]):
		z.append(2)
	for k in z:
		print(k, end=' ')
	print()


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


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


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


for _ in range(int(input())):
	n = int(input())
	print('2 ' * n if n % 2 == 0 else '1 ' * n)


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


import sys, collections
tc = int(sys.stdin.readline())
for _ in range(tc):
	n = int(sys.stdin.readline())
	arr = [1] * n
	print(' '.join(map(str, arr)))


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


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


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


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


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


t = int(input())
if 1 <= t <= 100:
	l1 = []
	for i in range(t):
		n = int(input())
		l2 = []
		c = ''
		if 1 <= n <= 100:
			for i in range(n):
				c += '1 '
			l2.append(c)
		l1.append(l2)
for i in l1:
	for j in i[0].split():
		print(int(j), end=' ')
	print()


T = int(input())
for t in range(T):
	n = int(input())
	a = list()
	for i in range(n):
		a.append(n)
	print(' '.join(map(str, a)))


t = int(input())
for x in range(t):
	q = int(input())
	ans = [1] * q
	for y in ans:
		print(y, end=' ')
	print()


x = int(input())
for i in range(x):
	y = int(input())
	print(' '.join(['3' for _ in range(y)]))


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


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


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


import sys
input = sys.stdin.readline

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


inp = int(input())
for case in range(inp):
	k = int(input())
	tmp = []
	for i in range(1, k + 1):
		tmp.append(k)
	print(*tmp)


def main(n):
	return ('1 ' * n)[:-1]
for _ in range(int(input())):
	n = int(input())
	print(main(n))


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


from sys import stdin, stdout
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [1 for x in range(n)]
	print(*arr)


n = int(input())
the_list = []
for i in range(n):
	x = int(input())
	for j in range(x):
		the_list.append(10)
	for k in the_list:
		print(k, end=' ')
	the_list = []


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


import collections
for _ in range(int(input())):
	n = int(input())
	s = ('1 ' * n)[:-1]
	print(s)


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


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


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


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