import sys readline=sys.stdin.readline write=sys.stdout.write N=int(readline()) for n in range(N): d=int(readline()) ans=9*10**(d-1) print(ans)