#UnknownID38. 1IXMMMl3SjX0Wg#'!:*
1IXMMMl3SjX0Wg#'!:*
Statement
There are digital panels placed in a straight line. Each panel can show any digit from to . Initially, all panels show .
Every second, the digit shown by each panel increases by . In other words, at the end of every second, a panel that showed would now show , a panel that showed would now show , a panel that showed would now show , and so on.
When a panel is paused, the digit displayed on the panel does not change in the subsequent seconds.
You must pause exactly one of these panels, at any second you wish. Then, the panels adjacent to it get paused one second later, the panels adjacent to those get paused seconds later, and so on. In other words, if you pause panel , panel (for all valid ) would be paused exactly seconds later.
For example, suppose there are panels, and the -rd panel is paused when the digit is on it.
- The panel pauses seconds later, so it has the digit ;
- the panel pauses second later, so it has the digit ;
- the panel pauses second later, so it has the digit .
The resulting -digit number is . Note that this example is not optimal for .
Once all panels have been paused, you write the digits displayed on them from left to right, to form an digit number (it can consist of leading zeros). What is the largest possible number you can get? Initially, all panels show .
Format
Input
The first line of the input contains a single integer ( ) — the number of test cases. Each test case consists of a single line containing a single integer ( ).
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, print the largest number you can achieve, if you pause one panel optimally.
Sample
2
1
2
9
98
相关
在下列比赛中: