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