n = int(input()) for _ in range(n): d = int(input()) if d != 1: print(9 * pow(10, d - 1)) else: print(10)