Kth boom number
Easy Accuracy: 39.99% Submissions: 670 Points: 2

Boom numbers are numbers consisting only of digits 2 and 3. Given an integer k, display the k-th Boom number.

Input:
The first line of input contains a single integer T denoting the number of test cases. Then T test cases follow. Each test case consist of one line. The first line of each test case consists of an integer K.

Output:
Corresponding to each test case, in a new line, print the Kth boom number.


Constraints:
1 ≤ T ≤ 100
1 ≤ K ≤ 1000000

Example:

Input
2
2
100

Output
3

322323

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.