n = int(input()) for i in range(n): d = int(input()) print("9" + "0" * (d - 1))