The chef has a recipe he wishes to use for his guests,
but the recipe will make far more food than he can serve to the guests.
The chef therefore would like to make a reduced version of the recipe which has the same ratios of ingredients, but makes less food.
The chef, however, does not like fractions.
The original recipe contains only whole numbers of ingredients,
and the chef wants the reduced recipe to only contain whole numbers of ingredients as well.
Help the chef determine how much of each ingredient to use in order to make as little food as possible.

------ Input ------ 

Input will begin with an integer T, the number of test cases.
Each test case consists of a single line.
The line begins with a positive integer N, the number of ingredients.
N integers follow, each indicating the quantity of a particular ingredient that is used.

------ Output ------ 

For each test case, output exactly N space-separated integers on a line,
giving the quantity of each ingredient that the chef should use in order to make as little food as possible.

------ Constraints ------ 

T ≤ 100 

2 ≤ N ≤ 50

All ingredient quantities are between 1 and 1000, inclusive.

----- Sample Input 1 ------ 
3
2 4 4
3 2 3 4
4 3 15 9 6
----- Sample Output 1 ------ 
1 1
2 3 4
1 5 3 2

Difficulty: EASY

Solutions:
T = int(input())
for i in range(T):
	l = list(map(int, input().split()[1:]))
	n = min(l)
	while n:
		if all([i % n == 0 for i in l]):
			print(*[i // n for i in l])
			break
		n = n - 1


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = a[1:]
	n = min(b)
	while n:
		if all((i % n == 0 for i in b)):
			print(*[i // n for i in b])
			break
		n -= 1


def gcd(lst):
	cd_lst = []
	x = max(lst)
	for i in range(2, x + 1):
		count = 0
		for j in lst:
			if j % i == 0:
				count = count + 1
		if count == len(lst):
			cd_lst.append(i)
	if len(cd_lst) == 0:
		return 0
	else:
		return max(cd_lst)
test = int(input())
for I in range(test):
	lst = list(map(int, input().split()))
	del lst[0]
	x = len(lst)
	ans = gcd(lst)
	if ans == 0:
		for i in range(len(lst)):
			if i != x - 1:
				print(lst[i], end=' ')
			else:
				print(lst[x - 1])
	else:
		for i in range(len(lst)):
			if i != x - 1:
				y = lst[i] // ans
				print(y, end=' ')
			else:
				y = lst[i] // ans
				print(y)


import math
for i in range(int(input())):
	lst = list(map(int, input().split()))
	n = lst[0]
	lst = lst[1:]
	gcd = math.gcd(lst[0], lst[1])
	for i in range(2, n):
		gcd = math.gcd(gcd, lst[i])
	lst2 = list(map(lambda x: x // gcd, lst))
	print(*lst2)


t = int(input())
for j in range(t):
	lst = list(map(int, input().split()))
	l = lst[1:]
	n = min(l)
	while n:
		if all([i % n == 0 for i in l]):
			print(*[i // n for i in l])
			break
		n = n - 1


EP = int(input())
for i in range(EP):
	ep = list(map(int, input().split()[1:]))
	pc = min(ep)
	while pc:
		if all([i % pc == 0 for i in ep]):
			print(*[i // pc for i in ep])
			break
		pc = pc - 1


import math
T = int(input())
for t in range(T):
	a = list(map(int, input().split()))
	list1 = list(a[1:])
	arr = []
	l = list1[0]
	for i in range(1, len(list1)):
		l = math.gcd(l, list1[i])
	for i in list1:
		if i % l == 0:
			arr.append(i // l)
	if len(list1) == len(arr):
		print(*arr)
	else:
		print(*list1)


tesva = int(input())
for c in range(tesva):
	z = list(map(int, input().split()[1:]))
	q = min(z)
	while q:
		if all([c % q == 0 for c in z]):
			print(*[c // q for c in z])
			break
		q -= 1


import math
for i in range(int(input())):
	n = list(map(int, input().split()))
	n1 = n[1:]
	l = []
	g = math.gcd(n1[0], n1[1])
	for i in n1:
		g = math.gcd(g, i)
	for i in n1:
		l.append(i // g)
	print(*l)


t = int(input())
for i in range(t):
	List = list(map(int, input().split()))
	List1 = list(List[1:])
	l = min(List1)
	while l:
		if all((i % l == 0 for i in List1)):
			print(*[i // l for i in List1])
			break
		l -= 1


def fac(n):
	l = []
	for i in range(2, n // 2 + 1):
		if n % i == 0:
			l.append(i)
	l.append(n)
	l.reverse()
	return l
for i in range(int(input())):
	l = list(map(int, input().split()))
	n = l[0]
	l.remove(l[0])
	l1 = fac(min(l))
	l2 = []
	c1 = 0
	for i in l1:
		c = 0
		for j in l:
			if j % i == 0:
				c = c + 1
				l2.append(j // i)
		if c == n:
			print(*l2)
			c1 = c1 + 1
			break
		else:
			l2 = []
	if c1 == 0:
		print(*l)


import math
T = int(input())
for i in range(T):
	li = list(map(int, input().split()))
	n = li[0]
	li.remove(li[0])
	gcd = math.gcd(li[0], li[1])
	for j in range(2, n):
		gcd = math.gcd(gcd, li[j])
	for k in range(n):
		li[k] = int(li[k] / gcd)
	print(*li, sep=' ')