(read)(while(let1 K(round->exact(sqrt(read)))(print(+(* 11 K)(mod K 10)))))