#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int N, K; string S, T; int A[202020], pos = 0; int main() { cin >> N >> K; cin >> S; for (int i = K; i <= N; i++) { A[pos] = i; pos++; } if ((N - K) % 2 == 1) { for (int i = 1; i <= K - 1; i++) { A[pos] = i; pos++; } } else { for (int i = K - 1; i >= 1; i--) { A[pos] = i; pos++; } } for (int i = 0; i < N; i++) { T += S[A[i] - 1]; } cout << T << endl; return 0; }