#include <cstring>
#include <algorithm>
#include <cstdio>

const int N = 200010;
const int M = 1000010;
const int K = M/2;
int _w;

int n, k, p, st;
char s[M];

void solve() {
	if( s[p] - st == 'A' ) {
		s[p] = 131 - s[p];
	} else {
		st ^= 1;
		s[p+n] = st ? 'B' : 'A';
		++p;
	}
}

int main() {
	_w = scanf( "%d%d%s", &n, &k, s );
	if( k <= K ) {
		while( k-- ) solve();
		for( int i = 0; i < n; ++i )
			putchar( st ? 131 - s[p+i] : s[p+i] );
		puts("");
	} else {
		for( int i = 0; i < K; ++i ) solve();
		k -= K;
		if( n % 2 && k % 2 ) s[p] = 131 - s[p];
		for( int i = 0; i < n; ++i )
			putchar( st ? 131 - s[p+i] : s[p+i] );
		puts("");
	}
	return 0;
}
