A number is a special number if it’s digits only consist 0, 1, 2, 3, 4 or 5. Given a number n and we have to find n-th Special Number.
First line of input contains the number of test cases.The only line of the test case contains N.
Print the nth special number.
1 <= T <= 100
1 <= N <= 105
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.