a=$<.map{|v|v.to_i} i=-1;puts"#$v#{[a[0,i].reverse,a[i,9]].all?{|_|_.find{|w|$v