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