n=int(input()) l=[] for i in range(n): t=int(input()) l.append(9*(10**(t-1))) for x in l: print(x)