#include using namespace std; typedef long long ll; typedef long double ld; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> n >> k; string s;cin >> s; string t=s.substr(k-1,n-k+1),u=s.substr(0,k-1); if((n-k)%2==0){ reverse(u.begin(),u.end()); } cout << t << u << endl; }