Problem: There are n digital panels placed in a straight line. Each panel can show any digit from 0 to 9. Initially, all panels show 0.

Every second, the digit shown by each panel increases by 1. In other words, at the end of every second, a panel that showed 9 would now show 0, a panel that showed 0 would now show 1, a panel that showed 1 would now show 2, 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 2 seconds later, and so on. In other words, if you pause panel x, panel y (for all valid y) would be paused exactly |x−y| seconds later.

For example, suppose there are 4 panels, and the 3-rd panel is paused when the digit 9 is on it.

  * The panel 1 pauses 2 seconds later, so it has the digit 1; 
  * the panel 2 pauses 1 second later, so it has the digit 0; 
  * the panel 4 pauses 1 second later, so it has the digit 0. 



The resulting 4-digit number is 1090. Note that this example is not optimal for n = 4.

Once all panels have been paused, you write the digits displayed on them from left to right, to form an n digit number (it can consist of leading zeros). What is the largest possible number you can get? Initially, all panels show 0.

Input

The first line of the input contains a single integer t (1 ≤ t ≤ 100) — the number of test cases. Each test case consists of a single line containing a single integer n (1 ≤ n ≤ 2⋅10^5).

It is guaranteed that the sum of n over all test cases does not exceed 2⋅10^5.

Output

For each test case, print the largest number you can achieve, if you pause one panel optimally.

Example

Input


2
1
2


Output


9
98

Note

In the first test case, it is optimal to pause the first panel when the number 9 is displayed on it.

In the second test case, it is optimal to pause the second panel when the number 8 is displayed on it.

Solution (in JAVA):

Solution:
import java.util.*;
import java.math.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

     //--------------->>>>IF YOU ARE HERE FOR QUICKSORT HACK THEN SORRY NO HACK FOR YOU<<<-------------------

public class a{ 
     static long[] count,count1,count2;
     static Node[] nodes;
     static long[] arr;
     static int[] dp,arrInt,darrInt;
     static char[] ch,ch1;
     static long[] darr,farr;
     static int[][] mat,mat1;
     static int[][] space;
     static boolean[][] vis;
     static long x,h;
     static long maxl;
     static double dec;
     static long mx = (long)1e10;
     static String s,s1,s2,s3,s4;
     static long minl;
     static int start_row;
     static int start_col;     
     static int end_row;     
     static int end_col;     
     static long mod = 998244353;
     // static int minl = -1;
     // static long n;
     static int n,n1,n2,q,r1,c1,r2,c2;
     static long a;
     static long b;
     static long c;
     static long d;
     static long y,z;
     static int m;
     static int k;
     static FastScanner sc;
     static String[] str,str1;
     static Set<Integer> set,set1,set2;
     static SortedSet<Long> ss;
     static List<Integer> list,list1,list2,list3;
     static PriorityQueue<Integer> pq,pq1;
     static LinkedList<Integer> ll;
     static Map<Integer,List<Integer>> map1;
     static Map<Integer,Integer> map;
     static StringBuilder sb,sb1,sb2;
     static int index,ans;
     static long[] sum;
     static int[] dx = {0,-1,0,1,-1,1,-1,1};
     static int[] dy = {-1,0,1,0,-1,-1,1,1};

     // public static void solve(){

     //    FastScanner sc = new FastScanner();
     //    // int t = sc.nextInt();
     //    int t = 1;
     //    for(int tt = 0 ; tt < t ; tt++){

     //        // s = sc.next();
     //        // s1 = sc.next();

     //        n = sc.nextInt();

     //        m = sc.nextInt();

     //        // sb = new StringBuilder();
     //        // map = new HashMap<>();
     //        q = sc.nextInt();
     //        sb = new StringBuilder();
     //        // System.out.println(q);
     //        // k = sc.nextLong();
     //        // ch = sc.next().toCharArray();
     //        // boolean ans = false;
     //        // int charge = n;
     //        // int prev = 0;

     //        count = new int[200002];
           
     //        // m = sc.nextInt();
     //        // double ans = mx*1.0;
     //        // long added = 0;
     //        // set = new HashSet<>();
     //        // long count = 0;
     //        // long ans = 0;

     //        for(int o = 0 ; o < q ; o++){

     //            // ch = sc.next().toCharArray();
     //            // System.out.println(n + " " + m);
     //            int l = sc.nextInt();
     //            int r = sc.nextInt();
     //            sb.append(count[r]-count[l-1]+"\n");
                
     //        }
     //        System.out.print(sb);
     //        // System.out.println("NO");

     //    }
        
     // }

     //--------------->>>>IF YOU ARE HERE FOR QUICKSORT HACK THEN SORRY NO HACK FOR YOU<<<-------------------


// static class Graph 
// { 
//     private int V;    
//     private LinkedList<Integer> adj[]; 

//     void DFSUtil(int v,boolean visited[]) { 
//         visited[v] = true; 
  
//         int n; 
//         Iterator<Integer> i =adj[v].iterator(); 
//         while (i.hasNext()) 
//         { 
//             n = i.next(); 
//             if (!visited[n]) 
//                 DFSUtil(n,visited); 
//         } 
//     } 

//     Graph(int v){ 
//         V = v; 
//         adj = new LinkedList[v]; 
//         for (int i=0; i<v; ++i) 
//             adj[i] = new LinkedList(); 
//     } 
  
//     Graph getTranspose(){ 
//         Graph g = new Graph(V); 
//         for (int v = 0; v < V; v++) 
//         { 
//             Iterator<Integer> i =adj[v].listIterator(); 
//             while(i.hasNext()) 
//                 g.adj[i.next()].add(v); 
//         } 
//         return g; 
//     } 
  
//     void addEdge(int v, int w){
//         adj[v].add(w); 
//     } 

//     void fillOrder(int v, boolean visited[], Stack stack){ 
//         visited[v] = true; 
  
//         Iterator<Integer> i = adj[v].iterator(); 
//         while (i.hasNext()) 
//         { 
//             int n = i.next(); 
//             if(!visited[n]) 
//                 fillOrder(n, visited, stack); 
//         }
//         stack.push(new Integer(v)); 
//     } 

//     int printSCCs(){ 
//         Stack stack = new Stack(); 
  
//         boolean visited[] = new boolean[V]; 
//         for(int i = 0; i < V; i++) 
//             visited[i] = false; 
//         for (int i = 0; i < V; i++) 
//             if (visited[i] == false) 
//                 fillOrder(i, visited, stack); 
  
//         Graph gr = getTranspose(); 
  
//         for (int i = 0; i < V; i++) 
//             visited[i] = false; 
  
//         int count = 0;
//         while (stack.empty() == false) 
//         { 
//             int v = (int)stack.pop(); 
  
//             if (visited[v] == false) 
//             {   
//                 count += 1;
//                 gr.DFSUtil(v, visited);
//             } 
//         }
//         return count; 
//     } 
// } 

//      public static void f(int r,int c){

//         if(r == m){
//             Graph g = new Graph((n)*(m)); 
//             for(int i = 0 ; i < m ; i++){
//                 for(int j = 0 ; j < n ; j++){
//                     // System.out.println(mat[i][j]);
//                     if(j+1 < n && mat[i][j] >= mat[i][j+1]){
//                         // System.out.println((i*n+j) + " " + (i*n+j+1));
//                         g.addEdge(i*n+j, i*n+j+1); 
//                     }
//                     if(j-1 > -1 && mat[i][j] >= mat[i][j-1]){
//                         // System.out.println((i*n+j) + " " +  (i*n+j-1));
//                         g.addEdge(i*n+j, i*n+j-1); 
//                     }
//                     if(i+1 < m && mat[i][j] >= mat[i+1][j]){
//                         // System.out.println((i*n+j) + " " + ((i+1)*n+j));                         
//                         g.addEdge(i*n+j, (i+1)*n+j); 
//                     }
//                     if(i-1 > -1 && mat[i][j] >= mat[i-1][j]){
//                         // System.out.println((i*n+j) + " " +  ((i-1)*n+j));
//                         g.addEdge(i*n+j, (i-1)*n+j); 
//                     }
//                 }
//             }
//             count[(g.printSCCs())] += 1;
//             return; 
//         }

//         for(int i = 1 ; i <= k ; i++){
//             mat[r][c] = i;
//             if(c == n-1){
//                 f(r+1,0);
//             }
//             else
//                 f(r,c+1);
//         }

//      }

     public static boolean subsetSum(int[] A, int i, int sum, Map<String, Boolean> mapTo,List<Integer> list){

        if (sum == 0) {
            int res = 0;
            int ind = Collections.binarySearch(list,list.size()+1); 
            if(ind < 0)
                ind = Math.abs(ind+1);
            res = list.size()-ind;
            // for(int j = 0 ; j < list.size(); j++){
            //     System.out.print(list.get(j));
            // }
            // System.out.println();
            // System.out.println(res);
            ans = Math.min(ans,res);
            return true;
        }
 
        if (i >= n || sum < 0) {
            return false;
        }
 
        String key = i + "#" + sum;

        if (!mapTo.containsKey(key)){
            list.add(i+1);
            boolean include = subsetSum(A, i+1, sum - A[i], mapTo,list);
            list.remove(list.size()-1);
            boolean exclude = subsetSum(A, i+1, sum, mapTo,list);
            mapTo.put(key, include || exclude);
        }
 
        return mapTo.get(key);

    }
     
    public static void solve(){

        sb = new StringBuilder();
        if(n == 1){
            System.out.println("9");
            return;
        }
        int num = 9;
        sb.append("98");
        for(int i = 2 ; i < n ; i++){
                if(num > 9)
                    num -= 10;
                sb.append(num);
                num += 1;
        }

        System.out.println(sb);
    }
        
     public static void main(String[] args) {

            sc = new FastScanner();
            // Scanner sc = new Scanner(System.in);
            int t = sc.nextInt();
            // int t = 1;
            // int l = 1;
            while(t > 0){
                
                // n = sc.nextInt();
                // n = sc.nextLong();
                // k = sc.nextLong();
                // x = sc.nextLong();
                // y = sc.nextLong();
                // z = sc.nextLong();

                // a = sc.nextLong();
                // b = sc.nextLong();
                // c = sc.nextLong();
                // d = sc.nextLong();

                // x = sc.nextLong();
                // y = sc.nextLong();
                // z = sc.nextLong();
                // d = sc.nextLong();
                // n = sc.nextLong();

                n = sc.nextInt();

                // n = 5;
                // n1 = sc.nextInt();

                // m = sc.nextInt();
                // q = sc.nextInt();

                // k = sc.nextInt();

                // x = sc.nextLong();
                // d = sc.nextLong();

                // s = sc.next();

                // ch = sc.next().toCharArray();
                // ch1 = sc.next().toCharArray();

                // n = 3;

                // arr = new long[n];
                // for(int i = 0 ; i < n ; i++){
                //     arr[i] = sc.nextLong();
                // }

                // arrInt = new int[n];
                // for(int i = 0 ; i < n ; i++){
                //     arrInt[i] = sc.nextInt();
                // }
                // x = sc.nextLong();
                // y = sc.nextLong();
                // ch = sc.next().toCharArray();
                // m = n;
                // darr = new long[m];
                // for(int i = 0 ; i < m ; i++){
                //     darr[i] = sc.nextLong();
                // }

                // m = n;
                // darrInt = new int[m];
                // for(int i = 0 ; i < m ; i++){
                //     darrInt[i] = sc.nextInt();
                // }

                // farr = new int[n];
                // for(int i = 0; i < n ; i++){
                //     farr[i] = sc.nextInt();
                // }

                // mat = new long[n][m];
                // for(int i = 0 ; i < n ; i++){
                //     for(int j = 0 ; j < m ; j++){
                //         mat[i][j] = sc.nextLong();
                //     }
                // }

                // m = n;
                // m = 5;
                // mat = new char[n][m];
                // for(int i = 0 ; i < n ; i++){
                //     String s = sc.next();
                //     for(int j = 0 ; j < m ; j++){
                //         mat[i][j] = s.charAt(j);
                //     }
                // }

                // m = n;
                // mat1 = new char[n][m];
                // for(int i = 0 ; i < n ; i++){
                //     String s = sc.next();
                //     for(int j = 0 ; j < m ; j++){
                //         mat1[i][j] = s.charAt(j);
                //     }
                // }

                // n= 5 ;
                // str = new String[n];
                // for(int i = 0 ; i < n ; i++)
                //     str[i] = sc.next();

                // nodes = new Node[n];
                // for(int i = 0 ; i < n ;i++)
                //     nodes[i] = new Node(sc.nextInt(),(i+1));

                // m = sc.nextInt();

                // System.out.println(solve()?"YES":"NO");
                 solve();       
                 // System.out.println(solve());
                 t -= 1;
            }

     }

     // public static dfs(int i){

     //    if(count[i] == 1)
     //        return;
     //    list = map.get(i);
     //    for(Integer j : list){
     //        if(j == i)
     //            continue;
     //        dfs(j);
     //    }
     // }

    public static int log(long n,long base){

         if(n == 0 || n == 1)
             return 0;

         if(n == base)
             return 1;

         double num = Math.log(n);
         double den = Math.log(base);

         if(den == 0)
             return 0;

         return (int)(num/den);
     }

    public static boolean isPrime(long n) { 
    // Corner cases 
        if (n <= 1)  
            return false; 

        if (n <= 3)  
            return true; 
      
        // This is checked so that we can skip  
        // middle five numbers in below loop 
        if (n%2 == 0 || n%3 == 0) 
            return false; 
      
        for (int i=5; i*i<=n; i=i+6) 
            if (n%i == 0 || n%(i+2) == 0) 
               return false; 
      
        return true; 
    } 

    public static long gcd(long a, long b)
    {
      if (b == 0)
        return a;
      return gcd(b, a % b); 
    }

     public static long mod_inverse(long a,long mod){
        long x1=1,x2=0;
        long p=mod,q,t;
        while(a%p!=0){
          q = a/p;
          t = x1-q*x2;
          x1=x2; x2=t;
          t=a%p;
          a=p; p=t;
        }
        return x2<0 ? x2+mod : x2;
    }

     // public static void swap(int i,int j){
     //     long temp = arr[j];
     //     arr[j] = arr[i];
     //     arr[i] = temp;
     // } 

    static final Random random=new Random();

    static void ruffleSortLong(long[] a) {
        int n=a.length;//shuffle, then sort 
        for (int i=0; i<n; i++) {
            int oi=random.nextInt(n);
            long temp=a[oi];
            a[oi]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }

    static void ruffleSortInt(int[] a) {
        int n=a.length;//shuffle, then sort 
        for (int i=0; i<n; i++) {
            int oi=random.nextInt(n);
            int temp=a[oi];
            a[oi]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }
    
    static void ruffleSortChar(char[] a) {
        int n=a.length;//shuffle, then sort 
        for (int i=0; i<n; i++) {
            int oi=random.nextInt(n);
            char temp=a[oi];
            a[oi]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }

    static class Node{
        Integer first;
        Integer second;
        Node(Integer f,Integer s){
            this.first = f;
            this.second = s;
        }
    }

     static class FastScanner {

                BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                StringTokenizer st=new StringTokenizer("");
                String next() {
                        while (!st.hasMoreTokens())
                                try {
                                        st=new StringTokenizer(br.readLine());
                                } catch (IOException e) {
                                        e.printStackTrace();
                                }
                        return st.nextToken();
                }
                
                int nextInt() {
                        return Integer.parseInt(next());
                }
                int[] readArray(int n) {
                        int[] a=new int[n];
                        for (int i=0; i<n; i++) a[i]=nextInt();
                        return a;
                }
                long nextLong() {
                        return Long.parseLong(next());
                }
        }

}