#include<iostream>
#include<algorithm>
using namespace std;
int x[1001], n, m; char c;
void _a() {
	for (int i = 1; i <= n; i++) {
		if (x[i] == 0) { x[i] = 1; return; }
	}
}
void _b() {
	for (int i = n; i >= 1; i--) {
		if (x[i] == 0 && x[i - 1] != 1 && x[i + 1] != 1) {
			x[i] = 2; return;
		}
	}
	for (int i = 1; i <= n; i++) {
		if (x[i] == 0) { x[i] = 2; return; }
	}
}
void _c() {
	for (int i = 1; i <= n; i++) {
		if (x[i] >= 1) {
			if (x[i + 1] == 0 && i < n) { x[i + 1] = 3; return; }
			if (x[i - 1] == 0 && i >= 2) { x[i - 1] = 3; return; }
		}
	}
	if (n % 2 == 0) { x[(n / 2) + 1] = 3; }
	else { x[(n + 1) / 2] = 3; }
}
void _d(int p) {
	int dist[1000];
	for (int i = 0; i < 1000; i++) { dist[i] = 10000000; }
	if (p == 0) { x[1] = 4; return; }
	for (int i = 1; i <= n; i++) {
		if (x[i] == 0) { continue; }
		for (int j = 1; j <= n; j++) {
			int D = i - j;
			if (D < 0) { D = -D; }
			dist[j] = min(dist[j], D);
		}
	}
	int maxn = 0, maxid = 0;
	for (int i = 1; i <= n; i++) {
		if (maxn < dist[i]) { maxn = dist[i]; maxid = i; }
	}
	x[maxid] = 4;
}
int main() {
	while (true) {
		cin >> n >> m; if (n == 0 && m == 0) { break; }
		for (int i = 1; i <= 1000; i++) { x[i] = 0; }
		for (int i = 0; i < m; i++) {
			cin >> c;
			int d = c - 'A' + 1;
			if (d == 1) { _a(); }
			if (d == 2) { _b(); }
			if (d == 3) { _c(); }
			if (d == 4) { _d(i); }
		}
		for (int i = 1; i <= n; i++) {
			if (x[i] == 0) { cout << '#'; }
			if (x[i] == 1) { cout << 'A'; }
			if (x[i] == 2) { cout << 'B'; }
			if (x[i] == 3) { cout << 'C'; }
			if (x[i] == 4) { cout << 'D'; }
		}
		cout << endl;
	}
	return 0;
}