package main import ( "bufio" "fmt" "os" ) func main() { s := next() fmt.Println(reverse(s)) } func reverse(s string) string { buf := []rune(s) for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 { buf[i], buf[j] = buf[j], buf[i] } return string(buf) } var sc = bufio.NewScanner(os.Stdin) func next() string { sc.Split(bufio.ScanWords) sc.Scan() return sc.Text() }