import sys,os,io input = sys.stdin.readline #input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline T = int(input()) ans = [0]*T for t in range(T): n = int(input()) ans[t] = 9*10**(n-1) print(*ans, sep='\n')