#include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N, K; cin >> N >> K; string S; cin >> S; if ((N-K+1) & 1) { reverse(S.begin(), S.begin()+K-1); } cout << S.c_str()+K-1 << S.substr(0, K-1) << endl; }