N = int(input()) for _ in range(N): d = int(input()) if d== 1: print(10) continue print(10 ** d - 10 ** (d-1))