N = int(input()) for i in range(N): a = int(input()) print(9*10**(a-1))