Problem: Having gained some experience with Prime Numbers, Robin now seeks Revenge from Bruce. So, while they are on their way from the Airport to the Summit, Robin comes up with a new Prime based Puzzle for Bruce.

He asks him to find rad(n) for t numbers which he lists before Bruce and then form a sorted table on the values of rad(n) (in ascending order) and he defines rad(n) as the product of the distinct prime factors of n. He then asks him to find E(k) which he defines as the kth element in the sorted table. Bruce has got to prepare for the Summit and so he seeks your help. Help him solve this puzzle to maintain his status as the The Dark Knight of Gotham.

Input:
First line contains t, the number of testcases, and t lines follow after it each containing a single integer k.

Output: Display E(k) for each value of n in a separate line

Constraints:

t ≤ 500

k ≤ 10000

Table is made for n values till 10000SAMPLE INPUT
5
1
3
5
6
10

SAMPLE OUTPUT
1
4
3
9
10

Explanation

Refer the table for n values till 10 in the question description and Cross-Reference it with the sample input/output.

Solution (in PYTHON):

Solution:
limit=100000
 
rad={}
buf={}
 
for i in range(1,limit+1):
 rad[i]=1
 
for j in range(1,limit+1):
 buf[j]=""
 
 
for i in range(2,limit+1):
 if rad[i]==1:
  for j in range(i,limit+1,i):
   rad[j]=rad[j]*i
 hey=rad[i]
 buf[hey]=buf[hey]+" "+str(i)
 
str=""
for i in buf.keys():
 str=str+buf[i]
str=str.split(" ")
str[0]=1
n=input()
for i in range(0,n):
	target=input()
	print str[target-1]