N = int(input()) for _ in range(N): t = int(input()) ans = 9*pow(10,t-1) print(ans)