N = int(input()) for i in range(N): n = int(input()) s = '9' + '0' * (n-1) print(s)