char s[99];main(c,v){for(;gets(s);puts(s))v=*s,*s=s[c=strlen(s)-1],s[c]=v;}