N=int(input()) ans=[] for i in range(N): d=int(input()) ans.append("9"+"0"*(d-1)) for i in range(N): print(ans[i])