n=int(input()) for _ in range(n): x=int(input()) if x==1:a=10 else: a=10**(x-1)*9 print(a)