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