R=range I=input for t in R(int(I())):N=int(I());print(*[i for i in R(1,min(10,N))],0,*[i%10 for i in R(11,N+1)],sep="")