#include<bits/stdc++.h>
using namespace std;
int main() {
int n, K;
cin >> n >> K;
string s;
cin >> s;
string result(26, '*');
for (int c = 0; c < 26; c++) {
char special = 'a' + c;
long long current_length = 0;
bool found = false;
for (int i = 0; i < n && !found; ) {
if (s[i] != special) {
current_length++;
if (current_length == K) {
result[c] = s[i];
found = true;
}
i++;
} else {
int x = 0;
while (i < n && s[i] == special) {
x++;
i++;
}
int m = 0;
int j = i;
while (j < n && m < x && s[j] != special) {
m++;
j++;
}
long long expand_length = (long long)x * m;
if (current_length + expand_length >= K) {
int relative_pos = K - current_length - 1;
int segment = relative_pos / m;
int char_pos = relative_pos % m;
result[c] = s[i + char_pos];
found = true;
} else {
current_length += expand_length;
i += m;
}
}
}
}
cout << result << endl;
return 0;
}