import std.stdio, std.algorithm;

char[111] chair; 
int n, m;

void main(){
	char ch;
	while (readf("%d %d\n", &n, &m), n || m) {
		chair[] = '#';
		foreach (i; 0..m) {
			readf("%c\n", &ch);
			if (ch == 'A') A();
			if (ch == 'B') B();
			if (ch == 'C') C();
			if (ch == 'D') D();
		}
		writeln(chair[0..n]);
	}
}

void A(){
	foreach (i; 0..n) {
		if (chair[i] == '#') {
			chair[i] = 'A';
			return;
		}
	}
}

void B(){
	foreach_reverse (i; 0..n) {
		if (chair[i] == '#' && (i == 0 || chair[i-1] != 'A') && (i == n-1 || chair[i+1] == 'A')) {
			chair[i] = 'B';
			return;
		}
	}
	foreach (i; 0..n) {
		if (chair[i] == '#') {
			chair[i] = 'B';
			return;
		}
	}
}

void C(){
	foreach (i; 1..n) {
		if (chair[i-1] != '#' && chair[i] == '#') {
			chair[i] = 'C';
			return;
		}
	}
	int a = n%2 ? (n+1)/2 : n/2+1;
	chair[a] = 'C';
}

void D(){
	int max = -1;
	int id = 0;
	foreach (i; 0..n) {
		if (distance(i) > max) {
			max = distance(i);
			id = i;
		}
	}
	chair[id] = 'D';
}

int distance(int p){
	bool flag;
	int f, b;
	f = b = 0;
	flag = true;
	foreach (i; p..n) {
		if (chair[i] != '#') {
			flag = false;
			break;
		}
		b++;
	}
	if (flag) b = -9999;

	flag = true;
	foreach_reverse (i; 0..p) {
		if (chair[i] != '#') {
			flag = false;
			break;
		}
		f++;
	}
	if (flag) f = -9999;


	return max(b, f);
}