#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <set>

using namespace std;
typedef long long LL;
static const double EPS = 1e-9;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define P(x) cout << (x) << endl

int main(void){  
  int n,m;
  while(cin>>n>>m){
    if(!n) break;
    int ch[102] = {0};
    char a;
    REP(h,m){
      cin >> a;
      if(a == 'A'){
        FOR(i,1,n+1){
          if(ch[i] == 0){
            ch[i] = 'A';
            break;
          }
        }
      }else if(a == 'B'){
        bool f=false;
        for(int i=n; i>0; i--){
          if(ch[i]==0 && ch[i+1] != 'A' && ch[i-1] != 'A'){
            ch[i] = 'B';
            f = true;
            break;
          }
        }
        if(!f){
          FOR(i,1,n+1){
            if(ch[i] == 0){
              ch[i] == 'B';
              break;
            }
          }
        }
      }else if(a == 'C'){
        int c=-1;
        FOR(i,1,n+1){
          if(ch[i] != 0){
            c = i;
            break;
          }
        }
        if(c==-1){
          ch[(n%2)?(n+1)/2:n/2+1] = 'C';
        }else{
          while(c<n+1){
            if(ch[c+1]==0&&c<n){
              ch[c+1] = 'C';
              break;
            }else if(ch[c-1]==0&&c>1){
              ch[c-1] = 'C';
              break;
            }
            c++;
          }
        }
      }else if(a == 'D'){
        int maxi,max=0;
        FOR(i,1,n+1){
          if(ch[i] == 0){
            int l=100,r=100,mi;
            for(int j=i-1; j>0; j--)
              if(ch[j] != 0){
                l = i-j;
                break;
              }
            for(int j=i+1; j<n+1; j++)
              if(ch[j] != 0){
                r = j-i;
                break;
              }
            mi = min(l,r);
            if(mi>max){
              maxi = i;
              max = mi;
            }
          }
        }
        ch[maxi] = 'D';
      }
    }
    for(int i=1; i<n+1; i++){
      if(ch[i] == 0) cout <<"#";
      else printf("%c",ch[i]);
    }
    cout << endl;
  }
  return 0;
}