Given a number 'N', we need to find the Nth number whose each digit is a prime number i.e 2, 3, 5, 7. In other words you have to find nth number of this sequence : 2, 3, 5, 7, 22, 23 ,.. and so on.
The first line contains a single integer T i.e. the number of test cases. The first and only line of each test case consists of an integer N .
In one line print the nth number of the given sequence made of prime digits.