n=int(input()) d=[int(input()) for _ in range(n)] for x in d: if x==1:print(10) else:print(pow(10,x)-pow(10,x-1))