object Model {
  def getOutput(input: String) = {
    if (input.size == 2) input
    else input.reverse
  }
}

object Main extends App {
  import Model._
  val in = scala.io.StdIn
  val input = in.readLine()
  println(getOutput(input))
}
