
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, char> plc;

int main()
{
	int m, n;
	while (cin >> n >> m, n, m) {

		int used[110] = {0};
		int emp[110] = {0};

		for (int i = 0; i < m; i++) {
			char a; cin >> a;
			if (a == 'A') {
				for (int j = 0; j < n; j++) {
					if (used[j] == 0) {
						used[j] = 1;
						break;
					}
				}
			}
			else if (a == 'B') {
				bool flag = false;
				for (int j = n - 1; j >= 1; j--) {
					if (used[j] == 0) {
						if (used[j + 1] != 1 && used[j - 1] != 1) {
							flag = true;
							used[j] = 2;
							break;
						}
					}
				}
				if (!flag) {
					for (int j = 0; j < n; j++) {
						if (used[j] == 0) {
							used[j] = 2;
							break;
						}
					}
				}
			}
			else if (a == 'C') {
				bool flag = false;
				for (int j = 0; j < n; j++) {
					if (used[j]) {
						flag = true;
						break;
					}
				}
				if (!flag) {
					if (n % 2 == 0)used[n / 2 + 1] = 3;
					else used[(n + 1) / 2] = 3;
				}
				else {
					for (int j = 0; j < n; j++) {
						if (used[j]) {
							if ((j + 1 < n) && used[j + 1] == 0) {
								used[j + 1] = 3;
								break;
							}
							else {
								if (j - 1 >= 0 && used[j - 1] == 0) {
									used[j - 1] = 3;
									break;
								}
							}
						}
					}
				}
			}
			else if (a == 'D') {
				bool flag = false;
				for (int j = 0; j < n; j++) {
					if (used[j]) {
						flag = true;
						break;
					}
				}
				if (!flag) {
					used[0] = 4;
				}
				else {
					int cnt = 0, mx = 0, mx_ind = 0;
					for (int j = 0; j < n; j++) {
						if (used[j] == 0)cnt++;
						else cnt = 0;
						emp[j] = cnt;
						if (mx < cnt) {
							mx = cnt;
							mx_ind = j;
						}
					}
					used[mx_ind - (mx / 2)] = 4;
				}
			}
		}
		for (int i = 0; i < n; i++) {
			if (used[i] == 1)cout << 'A';
			if (used[i] == 2)cout << 'B';
			if (used[i] == 3)cout << 'C';
			if (used[i] == 4)cout << 'D';
			if (used[i] == 0)cout << '#';
		}
		cout << endl;
	}
	return 0;
}