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