#include <bits/stdc++.h>
using namespace std;

const int INF = (1 << 30) - 1;

int N, M;
char seat[105];

int left_insert()
{
    int k = 1;
    while ( k <= N && seat[k] != '#') {
        k++;
    }
    return ( k );
}

int main()
{

    while ( cin >> N >> M, N || M ) {

        fill_n(seat, 105, '#');
        for ( int i = 0; i < M; i++ ) {
            char c;
            bool flag = false;
            int d[105];
            int k;

            cin >> c;
            fill_n(d, 105, INF);
            switch ( c ) {
                case 'A' :
                    seat[ left_insert() ] = 'A';
                    break;
                case 'B' :
                    k = N;
                    while ( k > 0 && (seat[k] != '#' || seat[k - 1] == 'A' || seat[k + 1] == 'A') ) {
                        k--;
                    }
                    if ( k > 0 ) {
                        seat[k] = 'B';
                    } else {
                        seat[ left_insert() ] = 'B';
                    }
                    break;
                case 'C' :
                    for ( int i = 1; i <= N; i++ ) {
                        if ( seat[i] != '#' ) {
                            if ( i < N && seat[i + 1] == '#' ) {
                                seat[i + 1] = 'C';
                                flag = true;
                                break;
                            }
                            if ( i > 1 && seat[i - 1] == '#' ) {
                                seat[i - 1] = 'C';
                                flag = true;
                                break;
                            }
                        }
                    }
                    if ( !flag ) {
                        seat[N / 2 + 1] = 'C';
                    }
                    break;
                case 'D' :
                    for ( int i = 1; i <= N; i++ ) {
                        if ( seat[i] != '#' ) {
                            d[i] = 0;
                        }
                        d[i] = min(d[i - 1] + 1, d[i]);
                    }
                    for ( int i = N; i > 0; i-- ) {
                        d[i] = min(d[i], d[i + 1] + 1);
                    }
                    int maxp = 1;
                    for ( int i = 2; i <= N; i++ ) {
                        if ( d[i] > d[maxp] ) {
                            maxp = i;
                        }
                    }
                    seat[maxp] = 'D';
                    break;
            }
        }
        for ( int i = 1; i <= N; i++ ) {
            cout << seat[i];
        }
        cout << endl;
    }
}

