def solve(d): if d == 1: return '10' else: return '9' + '0'*(d-1) n = int(input()) for i in range(n): d = int(input()) print(solve(d))