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

using namespace std;

class A {
public:
	vector<char> set_chair(vector<char> chair) {
		for (int i = 1; i < chair.size()-1; i++) {
			if (chair[i] == '#') {
				chair[i] = 'A';
				return chair;
			}
		}
	}
};

class B {
public:
	vector<char> set_chair(vector<char> chair) {
		for (int i = chair.size()-2; i >= 1; i--) {
			if (chair[i] == '#' && chair[i + 1] != 'A' && chair[i - 1] != 'A') {
				chair[i] = 'B';
				return chair;
			}
		}
		for (int i = 1; i < chair.size()-1; i++) {
			if (chair[i] == '#') {
				chair[i] = 'B';
				return chair;
			}
		}
	}
};

class C {
public:
	vector<char> set_chair(vector<char> chair) {
		for (int i = 1; i < chair.size()-1; i++) {
			if (chair[i] != '#') {
				if (chair[i + 1] == '#' && i+1 != chair.size()-1) {
					chair[i + 1] = 'C';
					return chair;
				}else if (chair[i - 1] == '#' && i-1 != 0) {
					chair[i - 1] = 'C';
					return chair;
				}
			}
		}

		if (chair.size() % 2 == 1)chair[(chair.size() + 1) / 2 + 1] = 'C';
		else chair[chair.size() / 2 + 1 + 1] = 'C';
		return chair;

	}
};

class D {
public:
	vector<char> set_chair(vector<char> chair) {
		vector<int> numOfMostDistance(chair.size());
		for (int i = 1; i < chair.size() - 1; i++) {
			int rightMax = 0;
			int leftMax =  0;
			for (int j = 0; chair[i + j] == '#' && j+i != chair.size()-1; rightMax++,j++);
			for (int j = 0; chair[i - j] == '#' && i-j != 0; leftMax++,j++);
			numOfMostDistance[i] = min(rightMax, leftMax);
		}

		bool chairIsEmpty = true;
		for (int i = 1; i < chair.size() - 1; i++) {
			if (chair[i] != '#')chairIsEmpty = false;
		}

		if (chairIsEmpty)chair[1] = 'D';
		else chair[max_element(numOfMostDistance.begin(), numOfMostDistance.end()) - numOfMostDistance.begin()] = 'D';
		return chair;
	}
};


int main() {
	int n, m;
	while (cin >> n >> m, n, m) {
		vector<char> chair(n + 2,'#');
		for (int i = 0; i < m; i++) {
			char a; cin >> a;
			if (a == 'A') {
				A tmp;
				chair = tmp.set_chair(chair);
			}
			if (a == 'B') {
				B tmp;
				chair = tmp.set_chair(chair);
			}
			if (a == 'C') {
				C tmp;
				chair = tmp.set_chair(chair);
			}
			if (a == 'D') {
				D tmp;
				chair = tmp.set_chair(chair);
			}
		}
		for (int i = 1; i < chair.size() - 1; i++)cout << chair[i];
		cout << endl;
	}
}