def main(): N = int(input()) for _ in range(N): digit = int(input()) print(10 ** (digit - 1) * 9) if __name__ == "__main__": main()