#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>

using namespace std;

int N, M;
char ChairsPerson[101];
int Offset[101];


void solveA() {

	for (int i = 1; i <= N; ++i) {
		if (ChairsPerson[i]=='#') {
			ChairsPerson[i] = 'A';
			return;
		}
	}
}

void solveB() {

	for (int i = N; i >= 1; --i) {
		if (ChairsPerson[i] != '#') {
			continue;
		}
		if (i > 1 && ChairsPerson[i - 1] == 'A') {
			i -= 2;
			continue;
		}
		if (i < N  && ChairsPerson[i + 1] == 'A') {
			continue;
		}
		ChairsPerson[i] = 'B';
		return;
	}

	for (int i = 1; i <= N; ++i) {
		if (ChairsPerson[i] == '#') {
			ChairsPerson[i] = 'B';
			return;
		}
	}
}

void solveC(int id) {

	if (id == 0) {
		//firstperson
		ChairsPerson[N / 2 + 1] = 'C';
		return;
	}

	for (int i = 1; i <= N; ++i) {
		if (ChairsPerson[i] == '#') {
			continue;
		}
		if (i < N && ChairsPerson[i + 1] == '#') {
			ChairsPerson[i + 1] = 'C';
			return;
		}
		if (i > 1 && ChairsPerson[i - 1] == '#') {
			ChairsPerson[i - 1] = 'C';
			return;
		}
	}	
}

void solveD() {
	int pos, pos1, pos2, at;

	for (pos1 = 1; pos1 <= N; ++pos1) {
		if (ChairsPerson[pos1] == '#') {
			continue;
		}
		for (pos2 = 1; pos2 <= N; ++pos2) {
			Offset[pos2] = min(Offset[pos2], abs(pos1 - pos2));
		}
	}

	pos = 0;
	at = 1;
	for (pos1 = 1; pos1 <= N; ++pos1) {
		//cout << "pos1:" << pos1 << "  " << Offset[pos1] << endl;
		if (Offset[pos1] > pos) {
			pos = Offset[pos1];
			at = pos1;
		}
	}
	ChairsPerson[at] = 'D';
}

int main() {
	char person;

	while (cin >> N >> M, N) {
		fill(ChairsPerson + 1, ChairsPerson + N + 1, '#');
		fill(Offset + 1, Offset + N + 1, 1000);

		for (int i = 0; i < M; ++i) {
			cin >> person;
			switch (person)
			{
			case 'A':solveA(); break;
			case 'B':solveB(); break;
			case 'C':solveC(i); break;
			case 'D':solveD(); break;
			default:break;
			}
		}
		for (int i = 1; i <= N; ++i) {
			cout << ChairsPerson[i];
		}
		cout << endl;
	}

	return 0;
}


