N, *d = map(int, open(0).read().split()) for x in d: print(9 * 10 ** (x - 1))