N=int(input()) for i in range(N): n=int(input())-1 print('9'+'0'*n)