N = int(input()) D = [int(input()) for _ in range(N)] for d in D: if d==1: print(10) else: print("9"+"0"*(d-1))