# coding: utf-8 n = int(input()) for i in range(n): d = int(input()) if d==1: print(10) else: print(10**d-10**(d-1))