n = int(input()) s = [int(input()) for _ in range(n)] for i in s: if i == 1: print(10) elif i > 1: print("9"+"0"*(i-1)) else: print(0)