N = int(input()) lsd = [int(input()) for i in range(N)] for i in range(N): if lsd[i] == 1: print(10) else: print('9'+'0'*(lsd[i]-1))