let rev s =
  let rec rev_inner b i =
    match i with
      -1 -> b
    | x -> rev_inner (b^(Char.escaped s.[x])) (x-1)
  in rev_inner "" ((String.length s)-1);;

let () = read_line () |> rev |> print_endline;;