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