n = int(input()) for _ in range(n): d = int(input()) print("9", end="") print("0" * (d - 1))