#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <sstream>
#include <cassert>
#include <list>
using namespace std;
static const double EPS = 1e-10;
typedef long long ll;
typedef pair<int,int> PI;
typedef vector<int> vi;
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define F first
#define S second

int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int seki[111];

main(){
  int m,n;
  while(cin>>n>>m,n|m){
    string seat;
    rep(i,n)seat+='#';

    rep(i,m){
      //cout<<seat<<" "<<m-i<<endl;
      char c;
      int pos=0;
      cin>>c;
      switch(c){
      case 'A':
	pos=0;
	while(seat[pos]!='#')++pos;
	seat[pos]='A';
	break;
      case 'B':
	pos=n-1;
	while(true){
	  if(pos<0)break;
	  if(seat[pos]!='#'){
	    --pos;
	    continue;
	  }
	  if(pos && seat[pos-1]=='A'){
	    --pos;
	    continue;
	  }
	  if(pos+1<n && seat[pos+1]=='A'){
	    --pos;
	    continue;
	  }
	  seat[pos]='B';
	  break;
	}
	if(pos==-1){
	  pos=0;
	  while(seat[pos]!='#')++pos;
	  seat[pos]='B';
	}
	break;
      case 'C':
	if(i==0){
	  if(n%2)seat[(n+1)/2-1]='C';
	  else seat[n/2]='C';
	}else{
	  pos=0;
	  while(seat[pos]=='#')++pos;
	  while(true){
	    if(pos+1<n && seat[pos+1]=='#'){
	      seat[pos+1]='C';
	      break;
	    }else if(pos && seat[pos-1]=='#'){
	      seat[pos-1]='C';
	      break;
	    }
	    ++pos;
	  }
	}
	break;
      case 'D':
	if(i==0){
	  seat[0]='D';
	  continue;
	}
	memset(seki,0,sizeof(0));
	int maxt=0,maxpos=0;

	if(seat[0]=='#'){
	  seki[0]=1;
	  maxt=1;
	  maxpos=1;
	}
	pos=1;
	while(pos<n){
	  if(seat[pos]=='#')seki[pos]=seki[pos-1]+1;
	  else seki[pos]=0;
	  if(seki[pos]>maxt){
	    maxt=seki[pos];
	    maxpos=pos;
	  }
	  ++pos;
	}
	//rep(j,n)cout<<seki[j]<<" ";
	//cout<<endl;
	//cout<<maxpos<<" "<<maxt<<endl;
	if(maxpos==n-1)seat[n-1]='D';
	else if(maxpos==maxt-1)seat[0]='D';
	else if(maxt%2)seat[maxpos-maxt/2]='D';
	else seat[maxpos-maxt/2]='D';
	break;
      }
    }
    cout<<seat<<endl;
  }
}