n=int(input()) d=[int(input())for _ in range(n)] for e in d: print('9'+'0'*(e-1) if e>1 else 10)