for t in range(int(input())): N=int(input()) print(N*2) A,B=3*N,int(str(N)+str(N*2)) assert(B%A==0)