#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int n;
string seats;
char set_left(char ch) { for (char &c: seats) if (c == '#') return c = ch; }
char setB() {
    for (int i = n - 1; i >= 0; i--) {
        bool ok = seats[i] == '#';
        if (i + 1 < n) ok &= seats[i + 1] != 'A';
        if (i) ok &= seats[i - 1] != 'A';
        if (ok) return seats[i] = 'B';
    }
    return set_left('B');
}
char setC() {
    if (seats == string(n, '#')) return seats[n / 2] = 'C';
    for (int i = 0; i < n; i++) if (seats[i] != '#') {
        if (i + 1 < n && seats[i + 1] == '#') return seats[i + 1] = 'C';
        if (i && seats[i - 1] == '#') return seats[i - 1] = 'C';
    }
}
char setD() {
    if (seats == string(n, '#')) return seats[0] = 'D';
    vector<int> dist(n, n);
    for (int i = 0; i < n; i++) if (seats[i] != '#') {
        for (int j = i; j < n; j++) dist[j] = min(dist[j], j - i);
        for (int j = i; j >= 0; j--) dist[j] = min(dist[j], i - j);
    }
    int idx = max_element(dist.begin(), dist.end()) - dist.begin();
    return seats[idx] = 'D';
}

int main() {
    int m;
    while (cin >> n >> m, n) {
        seats = string(n, '#');
        while (m--) {
            char c; cin >> c;
            if (c == 'A') set_left('A');
            if (c == 'B') setB();
            if (c == 'C') setC();
            if (c == 'D') setD();
        }
        cout << seats << endl;
    }
    return 0;
}
