n = int(input()) for i in range(n): x = int(input()) if x == 1: print(10) else: print(9 * 10 ** (x - 1))