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