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