#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
void solve1(string& s, char c) {
	s[s.find('#')] = c;
}
void solve2(string& s) {
	for (int i = s.size() - 1; i >= 0; i--) {
		if (s[i] == '#' && (i < s.size() - 1 && s[i + 1] != 'A') && (i > 0 && s[i - 1] != 'A')) {
			s[i] = 'B'; return;
		}
	}
	solve1(s, 'B');
}
vector<int> dist(string s) {
	vector<int> ret(s.size(), 999999999);
	for (int i = 0; i < s.size(); i++) {
		if (s[i] != '#') {
			for (int j = 0; j < s.size(); j++) {
				ret[j] = min(ret[j], abs(i - j));
			}
		}
	}
	return ret;
}
void solve3(string &s) {
	for (int i = 0; i < s.size(); i++) {
		if (s[i] != '#') {
			if (i < s.size() - 1 && s[i + 1] == '#') {
				s[i + 1] = 'C'; return;
			}
			if (i > 0 && s[i - 1] == '#') {
				s[i - 1] = 'C'; return;
			}
		}
	}
	s[s.size() / 2] = 'C';
}
void solve4(string &s) {
	vector<int> ret = dist(s);
	s[max_element(ret.begin(), ret.end()) - ret.begin()] = 'D';
}
int N, Q;
int main() {
	while (cin >> N >> Q, N) {
		string s(N, '#'), t;
		while (Q--) {
			cin >> t;
			if (t == "A") solve1(s, 'A');
			if (t == "B") solve2(s);
			if (t == "C") solve3(s);
			if (t == "D") solve4(s);
		}
		cout << s << endl;
	}
	return 0;
}