package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
  reader := bufio.NewReader(os.Stdin)
  str,_ := reader.ReadString('\n')
   // reader.ReadLine()
   // If the line was too long for the buffer then isPrefix is set and the beginning of the line is returned. The rest of the line will be returned from future calls. isPrefix will be false when returning the last fragment of the line. The returned buffer is only valid until the next call to ReadLine. ReadLine either returns a non-nil line or it returns an error, never both.The text returned from ReadLine does not include the line end ("\r\n" or "\n").
  line := []byte(str)
  if line[len(line)-1] == '\n' {
    line = line[:len(line)-1]
  }
  for i, j := 0, len(line)-1; i < j; i, j =i+1, j-1 {
    line[i], line[j] = line[j], line[i]
  }
  fmt.Println(string(line))
}