#include <bits/stdc++.h>
using namespace std;
map<string, int> mp;
signed main(){
int n, f;
cin >> n >> f;
string s;
cin >> s;
set<string> st;
for(int i = 0; i < s.length() - 2; i++){
string s1 = s.substr(i, 3);
if(s1[1] == s1[2]){
mp[s1]++;
for(int j = 0; j < 26; j++){
s1[0] = char('a' + j);
if(mp[s1] + 1 >= f){
st.insert(s1);
}
}
i += 3;
if(i >= s.length()) break;
}
}
for(string i: st){
cout << i << endl;
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cm1hcDxzdHJpbmcsIGludD4gbXA7CnNpZ25lZCBtYWluKCl7CglpbnQgbiwgZjsKCWNpbiA+PiBuID4+IGY7CglzdHJpbmcgczsKCWNpbiA+PiBzOwoJc2V0PHN0cmluZz4gc3Q7Cglmb3IoaW50IGkgPSAwOyBpIDwgcy5sZW5ndGgoKSAtIDI7IGkrKyl7CgkJc3RyaW5nIHMxID0gcy5zdWJzdHIoaSwgMyk7CgkJaWYoczFbMV0gPT0gczFbMl0pewoJCQltcFtzMV0rKzsKCQkJZm9yKGludCBqID0gMDsgaiA8IDI2OyBqKyspewoJCQkJczFbMF0gPSBjaGFyKCdhJyArIGopOwoJCQkJaWYobXBbczFdICsgMSA+PSBmKXsKCQkJCQlzdC5pbnNlcnQoczEpOwoJCQkJfQoJCQl9CgkJICAgaSArPSAzOwoJCSAgIGlmKGkgPj0gcy5sZW5ndGgoKSkgYnJlYWs7IAoJCX0KCQkKCX0KCWZvcihzdHJpbmcgaTogc3QpewoJCWNvdXQgPDwgaSA8PCBlbmRsOyAKCX0KCQp9