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