var s=readLine s map{_=>println(s);s=s.last+s.init}