N = int(input()) for i in range(N): print(9 * 10 ** (int(input()) - 1))