package main import ( "fmt" ) func main() { var ( n,k int str string ) fmt.Scan(&n) fmt.Scan(&k) fmt.Scan(&str) if n==k { fmt.Println(reverse(str)) } else { fmt.Println(str[k-1:]+str[:k-1]) } } func reverse(s string) string { rs := []rune(s) for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { rs[i], rs[j] = rs[j], rs[i] } return string(rs) }