function Main(input) {
  const S = input
  if (S.length === 2) {
    console.log(S)
  } else {
    console.log(S[2].toString() + S[1].toString() + S[0].toString())
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"))