1.upto(?Ã){|k|k+=T while k!=T=k.to_s.reverse.to_i;p k}