N=int(input()) for i in range(N): a=int(input()) b="9" for j in range(a-1): b+="0" print(b)