function Main(input) {
  const S = input
  if (S.length === 2) {
    console.log(S)
  } else {
    var result = ''
    for (var i = S.length - 1; i >= 0; i--) {
      result += S[i]
    }
    console.log(result)
  }
}

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