N = int(input()) for _ in range(N): a = int(input()) print(10 ** (a - 1) * 9 if a > 1 else 10)