// parameter "input" gets all data
function Main(input) {
  var reverse = input.toLowerCase().split("").reverse().join("");
  if(input.length === 2) {
    console.log(input);
  } else if (input.length === 3) {
    console.log(reverse);
  }
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));