N, *D = map(int, open(0)) for d in D: if d == 1: print(10) else: print(9 * pow(10, d - 1))