You are given an array A consisting of N positive integers.

Suppose F(B,X) gives the minimum positive integer Y such that:
X divides Y \cdot B_{i} for all (1 ≤ i ≤ |B|).

Find the value of F(A,A_{i}) for all (1 ≤ i ≤ N). 

------ Input Format ------ 

- The first line of input contains a single integer T, denoting the number of test cases.
- Each test case consists of two lines of input.
- The first line of each test case contains an integer N — the length of the array A.
- The second line of each test case contains N space-separated integers A_{1},A_{2},\ldots,A_{N} representing the array A.

------ Output Format ------ 

For each test case, print N space-separated integers where the i^{th} integer denotes the value F(A,A_{i}). 

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

$1 ≤ T ≤ 10^{5}$
$1 ≤ N ≤ 5 \cdot 10^{5}$
$1 ≤ A_{i} ≤ 10^{6}$
- The sum of $N$ over all test cases won't exceed $5 \cdot 10^{5}$.

----- Sample Input 1 ------ 
2
2
1 2
3
2 2 2

----- Sample Output 1 ------ 
1 2
1 1 1

----- explanation 1 ------ 
Test case $1$: Given $A = [1, 2]$
- $F(A, A_{1}) = F(A, 1) = 1$: Here $X = 1$ and $Y = 1$ as $X = 1$ divides both $Y\cdot A_{1} = 1$ and $Y\cdot A_{2} = 2$.
- $F(A, A_{2}) = F(A, 2) = 2$: Here $X = 2$ and $Y = 2$ as $X = 2$ divides both $Y\cdot A_{1} = 2$ and $Y\cdot A_{2} = 4$.

Note that the values of $Y$ are minimum possible for both $F(A, A_{1})$ and $F(A, A_{2})$.

Test case $2$: Given $A = [2, 2, 2]$
- $F(A, A_{1}) = F(A, 2) = 1$: Here $X = 2$ and $Y = 1$ as $X = 1$ divides $Y\cdot A_{1} = 2, Y\cdot A_{2} = 2,$ and $Y\cdot A_{3} = 2$.
- $F(A, A_{2}) = F(A, 2) = 1$: Here $X = 2$ and $Y = 1$ as $X = 1$ divides $Y\cdot A_{1} = 2, Y\cdot A_{2} = 2,$ and $Y\cdot A_{3} = 2$.
- $F(A, A_{3}) = F(A, 2) = 1$: Here $X = 2$ and $Y = 1$ as $X = 1$ divides $Y\cdot A_{1} = 2, Y\cdot A_{2} = 2,$ and $Y\cdot A_{3} = 2$.

Note that the values of $Y$ are minimum possible for $F(A, A_{1}), F(A, A_{2}),$ and $F(A, A_{3})$.

Difficulty: MEDIUM

Solutions:
from math import gcd
for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	f = A[0]
	for i in range(1, n):
		f = gcd(f, A[i])
	res = list()
	for i in A:
		res.append(i // f)
	print(*res)


def gcd(x, y):
	c = x
	x = max(x, y)
	y = min(c, y)
	c = x % y
	while c != 0:
		x = y
		y = c
		c = x % y
	return y

def big_gcd(a):
	v = a[0]
	for i in range(1, len(a)):
		v = gcd(v, a[i])
	return v
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	G = big_gcd(a)
	arr = [str(e // gcd(e, G)) for e in a]
	print(' '.join(arr))


import math
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = [0] * n
	l = a[0]
	for j in range(1, n):
		l = math.gcd(l, a[j])
	ans = [0] * n
	for i in range(n):
		ans[i] = a[i] // l
	print(*ans)


import math
from typing import Sequence

def div_by_a_i(a: Sequence[int]) -> Sequence[int]:
	gcd = a[0]
	for i in a:
		gcd = math.gcd(gcd, i)
	result = [i // gcd for i in a]
	return result
t = int(input())
for _ in range(t):
	unused_n = input()
	a = [int(x) for x in input().split()]
	result = div_by_a_i(a)
	print(' '.join((str(x) for x in result)))


for q in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	from math import gcd
	ans = []
	g = arr[0]
	for i in range(1, n):
		g = gcd(g, arr[i])
	for i in arr:
		ans.append(i // g)
	print(*ans)


def fun(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	gcd = a[0]
	for i in range(1, n):
		gcd = fun(max(gcd, a[i]), min(gcd, a[i]))
	l = [x // gcd for x in a]
	print(*l)


from math import *

def solve(n, l):
	g = l[0]
	for i in range(1, n):
		g = gcd(g, l[i])
	for i in range(n):
		l[i] = l[i] // g
	return l
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	print(*solve(n, l))


import sys
input = sys.stdin.readline

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 outp(n):
	sys.stdout.write(str(n) + '\n')

def outlt(lst):
	sys.stdout.write(' '.join(map(str, lst)) + '\n')

def outplt(lst):
	sys.stdout.write('\n'.join(map(str, lst)))

def outpltlt(lst):
	sys.stdout.write('\n'.join(map(str, (' '.join(map(str, a)) for a in lst))))
from math import gcd
from functools import reduce

def gcdl(A):
	return reduce(gcd, A)
ans = []
for _ in range(inp()):
	N = inp()
	A = inlt()
	g = gcdl(A)
	ans.append([a // g for a in A])
outpltlt(ans)


import sys
input = sys.stdin.readline

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 outp(n):
	sys.stdout.write(str(n) + '\n')

def outlt(lst):
	sys.stdout.write(' '.join(map(str, lst)) + '\n')

def outplt(lst):
	sys.stdout.write('\n'.join(map(str, lst)))

def outpltlt(lst):
	sys.stdout.write('\n'.join(map(str, (' '.join(map(str, a)) for a in lst))))

def gcd(a, b):
	return gcd(b, a % b) if a % b else b
ans = []
for _ in range(inp()):
	N = inp()
	A = inlt()
	g = A[0]
	for a in A[1:]:
		g = gcd(a, g)
	ans.append([a // g for a in A])
outpltlt(ans)


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


from math import gcd
t = int(input())
while t:
	N = int(input())
	arr = list(map(int, input().split()))
	ans = []
	g = gcd(arr[0], arr[1])
	for i in range(2, N):
		g = gcd(g, arr[i])
	for x in arr:
		ans.append(x // g)
	print(*ans)
	t = t - 1


import math
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	y = []
	r = l[0]
	for k in range(n):
		r = math.gcd(r, l[k])
	for j in range(n):
		p = l[j]
		q = math.gcd(p, r)
		yy = p // q
		y.append(yy)
	print(*y)