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