#include<stdio.h>
#include<queue>
#include<assert.h>
#include<tuple>
#include<string>
#include<algorithm>
#include<iostream>
#include<map>
#include<string.h>
#include<vector>
#include<math.h>
#include<stdlib.h>
#include<set>
#include<ctype.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
typedef tuple<int,int,int> t3;

const int MX = 200005;
const int MM = 1000000007;

char buf[MX];
int N, K, flip;
queue<int> Q;

void push(int x){
	Q.push(flip^x);
}

int pop(){
	int v = Q.front()^flip; Q.pop();
	return v;
}

int main()
{
	scanf("%d%d%s", &N, &K, buf+1);
	for(int i = 1; i <= N; i++) Q.push(buf[i] == 'A');
	for(int i = 1; i <= K && i <= 2*N; i++){
		if( Q.front()^flip ) Q.front() ^= 1;
		else{
			Q.pop();
			flip ^= 1;
			push(1);
		}
	}
	if( K > 2*N && N%2 == 1 && (K-2*N)%2 == 1) Q.front() ^= 1;
	while(Q.size()){
		printf("%c", Q.front()^flip? 'A' : 'B');
		Q.pop();
	}
	printf("\n");
}
