T, = map(int, input().split()) for _ in range(T): N, = map(int, input().split()) print('9'+'0'*(N-1))