#include using namespace std; int main(){ int N, K; cin >> N >> K; string S; cin >> S; if ((N - K) % 2 == 0){ for (int i = K - 1; i < N; i++){ cout << S[i]; } for (int i = K - 2; i >= 0; i--){ cout << S[i]; } cout << endl; } else { for (int i = K - 1; i < N; i++){ cout << S[i]; } for (int i = 0; i <= K - 2; i++){ cout << S[i]; } cout << endl; } }