import sys def I(): return int(sys.stdin.readline().rstrip()) N = I() for _ in range(N): d = I() if d == 1: print(10) else: print(9*10**(d-1))