#!ruby -pl r=p;(n= ~/$/).downto(0){|i|(n-i+1).times{|j|s=$_[j,i];break r=s if s.reverse==s};break$_=r if r}