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

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