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