human
Give me a Python code to find the smallest of such numbers, since there can be multiple numbers with the maximum possible number of trailing zeros given the following:
A number is called as a lucky number if its decimal representation contains only the lucky digits, 4 and 7. e.g. 47, 744, 4 are lucky numbers, whereas 5, 17, 467 are not.
Recently, Na2a found a magic stone. With the help of this stone, he can multiply a number by any lucky number. Also, the magic stone can be used any number of times (possibly zero or infinite number of times). For example, if initially he has the number 1, then he can get numbers like 28 (formed by 1*4*7), 14476 (formed as 1*47*77*4) etc.
Na2a has N numbers in his bag which are denoted by array A. For each number Ai in his bag, he asks you to transform it to a number with maximum possible number of trailing zeroes by using Magic Stone. You have to find the smallest of such numbers, since there can be multiple numbers with the maximum possible number of trailing zeros.

Input

There is a single test case.
First line contains a single integer N as stated in the problem.
The second line contains N space-separated integers A1, A2, ... , AN where Ai denotes the i^th number in the bag.

Output

Output N lines, in which i^th line contains the answer corresponding to the number Ai.

Constraints

1 ≤ N ≤ 10^5
1 ≤ Ai ≤ 10^9 

Example
Input:
2
2 15

Output:
2
60

Explanation
Example case 1. You can't get any number having zeros at the end multiplying 2 by lucky numbers.
Example case 2. You can multiply 15 by 4 and get 60, which has one trailing zero.
assistant
#Here is Python code to find the smallest of such numbers, since there can be multiple numbers with the maximum possible number of trailing zeros.

t = input()
ar = raw_input().split()
bn = 0

# def check (a,b):
# 	if (a % 10 == 5):
		

for x in ar:
	d = int(x)
	r = 0
	fv = 0
	tw = 0
	# if (d % 10 == 0):
	# 	check(d,100)
	# print 1 % 5
	dw = d
	while(1):
		if (dw % 2 == 0):
			tw += 1
			dw /= 2
		if (dw % 5 == 0):
			fv += 1
			dw /= 5
		# print dw	
		if (dw % 2 != 0 and dw % 5 != 0 ):
			break

	r = fv - tw
	if ( r > 0):
		if (r % 2 != 0):
			r = r +1
		for e in range(r):
			d *= 2
	print d