n = int(input()) d = [int(input()) for _ in range(n)] for dd in d: print("9" + "0" * (dd - 1))