#include using namespace std; int main() { int N, K; string S; cin >> N >> K >> S; for (int i = 0; i + K <= N; i++) { reverse(S.begin() + i, S.begin() + i + K); } cout << S << "\n"; }