i=0;(s=System.in.text).each{x='';s[--i..-1].each{println x+=it}}