#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

#define int long long

using namespace std;

class Solver {
};

signed main() {
	while (true) {
		int n, m;
		cin >> n >> m;
		if (n == 0)break;

		vector<char> status(n, '#');
		for (int i = 0; i < m; i++) {
			char who;
			cin >> who;
			if (who == 'A') {
				for (int i = 0; i < n; i++) {
					if (status[i] == '#') {
						status[i] = 'A';
						break;
					}
				}
			}
			if (who == 'B') {
				bool valid = false;
				for (int i = n - 1; i >= 0; i--) {
					if (status[i] != '#')continue;

					if ((i + 1 < n && status[i + 1] == 'A')
						|| (i - 1 >= 0 && status[i - 1] == 'A'))continue;

					status[i] = 'B';
					valid = true;
					break;
				}

				if (!valid) {
					for (int i = 0; i < n; i++) {
						if (status[i] == '#') {
							status[i] = 'B';
							break;
						}
					}
				}
			}
			if (who == 'C') {
				bool valid = false;
				for (int i = 0; i <n; i++) {
					if (status[i] == '#')continue;

					if (i + 1 < n && status[i + 1] == '#') {
						status[i + 1] = 'C';
						valid = true;
						break;
					}
					if (i - 1 >= 0 && status[i - 1] == '#') {
						status[i - 1] = 'C';
						valid = true;
						break;
					}
				}

				if (!valid) {
					status[n / 2] = 'C';
				}
			}
			if (who == 'D') {
				vector<int> left(n, 0);
				int last = -1;
				for (int i = 0; i < n; i++) {
					if (status[i] != '#') last = i;
					else {
						if (last >= 0) left[i] = i - last;
						else left[i] = 1e9;
					}
				}
				last = -1;
				vector<int> right(n, 0);
				for (int i = n - 1; i >= 0; i--) {
					if (status[i] != '#')last = i;
					else {
						if (last >= 0) right[i] = last - i;
						else right[i] = 1e9;
					}
				}
				int now = 0;
				int dist = -1;
				for (int i = 0; i < n; i++) {
					if (status[i] != '#')continue;

					if (min(left[i], right[i]) > dist) {
						now = i;
						dist = min(left[i], right[i]);
					}
				}
				status[now] = 'D';
			}
		}

		for (int i = 0; i < n; i++) {
			cout << status[i];
		}
		cout << endl;
	}
}
