#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001LL int main(){ int _t; cin>>_t; rep(_,_t){ long long n; cin>>n; if(n<=9){ cout<=1000){ long long L = 888888888888888888; long long R = L; while(true){ n -= 8; if(n%9==0)break; L--; } R += n/9; cout<1){ long long t = R; rep(i,n-1){ L += t; R += t; } } cout<