#include<bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) REP((i),0,(n))
#define RREP(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define rrep(i,n) RREP(i,n,0)
#define each(it,X) for(__typeof((X).begin())  it=(X).begin();it!=(X).end();it++)
#define all(v) ((v).begin(),(v).end())
#define fi first
#define se second
#define pb push_back
typedef pair<int,int>pr;
typedef vector<int>vi;
typedef vector<vi>vvi;
typedef set<int>si;
const int INF=1070000000ll;
const int mod=1000000007ll;

int n,m;
char seet[100];
void A(){
    rep(i,n)if(seet[i]=='#'){
        seet[i]='A';
        return;
    }
}
void B(){
    rrep(i,n-1)if(seet[i]=='#'){
        if((i!=0||seet[i-1]!='A')&&(i!=n-1||seet[i+1]!='A')){
            seet[i]='B';
            return;
        }
    }
    rrep(i,n-1)if(seet[i]=='#'){
        seet[i]='B';
        return;
    }
}
void C(){
    rep(i,n)if(seet[i]=='#'){
        if((i!=0&&seet[i-1]!='#')||(i!=n-1&&seet[i+1]!='#')){
            seet[i]='C';
            return;
        }
    }
    seet[n/2]='C';
}
void D(){
    int ma=0,dist=0;
    rep(i,n)if(seet[i]=='#'){
        int v=1000;
        rep(j,n)if(seet[j]!='#'){
            v=min(abs(i-j),v);
        }
        if(dist<v){
            dist=v;
            ma=i;
        }
    }
    seet[ma]='D';
}
signed main(){
    cin.tie(0);ios_base::sync_with_stdio(0);

    while(cin>>n>>m,n||m){
        fill_n(seet,n,'#');
        rep(i,m){
            char c;cin>>c;
            switch(c){
                case 'A':A();break;
                case 'B':B();break;
                case 'C':C();break;
                case 'D':D();break;
            }
        }
        rep(i,n)cout<<seet[i];cout<<endl;
    }
    return 0;
}