// INDIAN ARMY
//mahi7781
#include<bits/stdc++.h>
#define teji ios_base::sync_with_stdio(false);cin.tie(NULL)
using namespace std;
#define ll long long int
#define mod 1000000007
#define pb push_back
#define ss second
#define ff first
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define pii pair<ll,ll>
#define f(i,x,n) for(ll i=x;i<n;i++)
 
int main()
{
    teji;
    ll t=1;
    cin>>t;
    while(t--)
    {
       ll n;
       cin>>n;
       if(n==1)
       cout<<9<<endl;
       else
       {
       cout<<"98";
       ll x=1;
       f(i,2,n)
       {

           cout<<(8+x)%10;
           x++;
          
       }
       cout<<endl;
       }
    }
    
}