#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, k;
	cin>>n>>k;
	string s;
	cin>>s;
	vector<int> dp(n, 1);
	int maxLength=1, maxIndex=0;
	// dp[1]=1;
	for(int i=1;i<n;i++){
		if(abs(s[i]-s[i-1])<=k)
			dp[i]=dp[i-1]+1;
		else
			dp[i]=1;
		
		if(dp[i]>maxLength){
			maxLength=dp[i];
			maxIndex=i;
		}
	}
	int startIndex = maxIndex - maxLength + 1;
    cout << s.substr(startIndex, maxLength) << endl;
	return 0;
}