n=int(input()) d=[int(input())for _ in range(n)] for e in d: s='0'*(e-1) print('9'+s)