import math nstr=int(input()) intstr=0 while nstr > 0: intstr=int(input())-1 print(int(9*math.pow(10,intstr))) nstr= nstr-1