N = int(input()) for _ in range(N): X = int(input()) print('9' + '0'*(X-1))