#include<iostream>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)

int findlm(int n,char *in){
  rep(i,n)if(in[i] == 0)return i;
}

int findNotA(int n,char *in){
  for(int i=n-1;i>=0;i--){
    if (in[i] == 0 && (i==0||in[i-1]!= 'A') && (i == n-1 || in[i+1] != 'A'))return i;
  }
  return -1;
}

int nextP(int n,char *in){
  rep(i,n){
    if (in[i] != 0){
      if (i < n-1 && in[i+1] == 0)return i+1;
      if (i >0 && in[i-1] == 0)return i-1;
    }
  }
  return -1;
}

int notNextP(int n,char *in){
  int ret = -1,maxdist=0;
  rep(i,n){
    if( in[i] != 0)continue;
    int tmpdist = 0;
    for(int j=i-1;j>=0;j--){
      if (in[j] != 0){tmpdist=i-j;break;}
    }
    for(int j=i+1;j<n;j++){
      if (in[j] != 0){tmpdist=min(tmpdist,j-i);break;}
    }
    if (tmpdist > maxdist)ret=i,maxdist = tmpdist;
  }
  return ret;
}

void put(int n,char *in,char inp){
  int index = -1;
  if (inp == 'A'){
    index = findlm(n,in);
  }else if (inp == 'B'){
    index = findNotA(n,in);
    if (index == -1)index = findlm(n,in);
  }else if (inp == 'C'){
    index = nextP(n,in);
    if (index == -1)index =n/2;
  }else if (inp == 'D'){
    index = notNextP(n,in);
    if (index == -1)index = 0;
  }
  in[index] = inp;
}


main(){
  char op[255];
  op['A']='A';  op['B']='B';  op['C']='C';  op['D']='D';
  op[0]='#';

  int n,m;
  char in[100];
  while(cin>>n>>m && n){
    rep(i,n)in[i] = 0;
    rep(i,m){
      char inp;
      cin>>inp;
      put(n,in,inp);
    }
    rep(i,n)cout << op[in[i]] ;
    cout << endl;
  }


}