n = int(input()) d = [] for _ in range(n): d = int(input()) res = "9" for i in range(d-1): res += "0" if d == 1: res = "10" print(res)