Problem2501--Distinct Primes

### 2501: Distinct Primes

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 8  Solved: 4
[Submit] [Status] [Web Board] [Creator:]

#### Description

Arithmancy is Draco Malfoy's favorite subject, but what spoils it for him is that Hermione Granger is in his class, and she is better than him at it.  Prime numbers are of mystical importance in Arithmancy, and Lucky Numbers even more so. Lucky Numbers are those positive integers that have at least three distinct prime factors; 30 and 42 are the first two. Malfoy's teacher has given them a positive integer n, and has asked them to find the nth lucky number. Malfoy would like to beat Hermione at this exercise, so although he is an evil git, please help him, just this once.  After all, the know-it-all Hermione does need a lesson.

#### Input

The first line contains the number of test cases T. Each of the next T lines contains one integer n.

#### Output

Output T lines, containing the corresponding lucky number for that test case.

#### Sample Input Copy

2
1
2


#### Sample Output Copy

30
42


Constraints:

1 <= T <= 20

1 <= n <= 1000