#include #include #include #include #include #include #include #include #include using namespace std; typedef long long int lli; #define urept(soeji, start, n) for (int soeji = start; soeji < n; soeji++) #define drept(soeji, start, n) for (int soeji = start; soeji > n; soeji--) int main(void) { int N, K; cin >> N >> K; string s; cin >> s; for (int i = 0; i < N - K + 1; i++) { //reverse(s.begin() + i, s.begin() + (i + K)); swap(s[i], s[i + K - 1]); } cout << s << endl; return 0; }