#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,j) FOR(i,0,j)
#define mp std::make_pair

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int,int> P;
typedef std::pair<int,P> State;

const int INF = 1001001001;

// S N E W(南北東西)
const int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1}, dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};

int N, M;
char chairs[100];

int main(){
    std::cin >> N >> M;

    REP(i, N){chairs[i] = '#';}

    REP(i, M){
        char c;
        std::cin >> c;

        if(c == 'A'){
            REP(j, N){
                if(chairs[j] == '#'){chairs[j] = 'A'; break;}
            }
        }else if(c == 'B'){
            bool can = false;
            for(int j=N-1;j>=0;j--){
                if(j-1 >= 0 && chairs[j-1] == 'A'){continue;}
                if(j+1 < N && chairs[j+1] == 'A'){continue;}
                chairs[j] = 'B';
                can = true;
                break;
            }
            if(can){continue;}
            REP(j, N){
                if(chairs[j] == '#'){chairs[j] = 'B'; break;}
            }
        }else if(c == 'C'){
            if(i == 0){chairs[(N+2)/2] = 'C'; continue;}

            REP(j, N){
                if(chairs[j] == '#'){continue;}
                if(j+1 < N && chairs[j+1] == '#'){chairs[j+1] = 'C'; break;}
                if(j-1 >= 0 && chairs[j-1] == '#'){chairs[j-1] = 'C'; break;}
            }
        }else if(c == 'D'){
            int pos = -1, max_l = 0;
            REP(j, N){
                if(chairs[j] != '#'){continue;}

                int l1 = INF, l2 = INF;
                REP(k, j){
                    if(chairs[k] != '#'){l1 = j-k; break;}
                }
                for(int k=N-1;k>j;k--){
                    if(chairs[k] != '#'){l2 = k-j; break;}
                }

                if(std::min(l1, l2) > max_l){pos = j; max_l = std::min(l1, l2);}
            }

            chairs[pos] = 'D';
        }
    }

    REP(i, N){
        putchar(chairs[i]);
    }
    puts("");
}