n=int(input()) d=[int(input()) for i in range(n)] for i in range(n): if(d[i]==1): print(10) else: print(10**(d[i]-1)*9)