#include<iostream>
using namespace std;
int main(){
  while(true){
    int n,m,j;
    cin>>n>>m;
    if(!n&&!m)break;
    char seat[n];
    char seatb[n];
    int len[n];
    bool sit = false;
    for(int i=0;i<n;i++){
      seat[i] = '#';
      seatb[i] = '#';    
    }
    for(int i=0;i<m;i++){
      char p;
      cin>>p;
      if(p=='A'){
	for(j=0;j<n;j++){
	  if(seat[j]=='#'){
	    seat[j] = 'A';
	    if(j>0)seatb[j-1]=='A';
	    if(j<n-1)seatb[j+1]=='A';
	    break;
	  }
	}
	sit = true;
      }
      if(p=='B'){
	for(j=n-1;j>=0;j--){
	  if(seat[j]=='#'&&seatb[j]=='#'){
	    seat[j] = 'B';
	    break;
	  }
	}
	if(j==n){
	  for(j=0;j<n;j++){
	    if(seat[j]=='#'){
	      seat[j] = 'B';
	      break;
	    }
	  }
	}
	sit = true;
      }
      if(p=='C'){
	if(!sit){
	  seat[n/2] = 'C';
	}
	else{
	  for(j=0;j<n-1;j++){
	    if(seat[j]!='#'&&seat[j+1]=='#'){
	      seat[j+1] = 'C';
	      break;
	    }
	  }
	}
	sit = true;
      }
      if(p=='D'){
	if(!sit){
	  seat[0] = 'D';
	}
	else{
	  int l=100;
	  for(int j=0;j<n;j++){
	    if(seat[j]!='#')l = 0;
	    else l++;
	    len[j] = l;
	  }
	  l=100;
	  int lenmax = 0,maxseat;
	  for(int j=n-1;j>=0;j--){
	    if(seat[j]!='#')l = 0;
	    else l++;
	    len[j] = min(len[j],l);
	    if(lenmax<=len[j]){
	      lenmax=len[j];
	      maxseat=j;
	    }
	  }
	  seat[maxseat] = 'D';
	}
	sit = true;
      }
    }
    for(int i=0;i<n;i++)
      cout<<seat[i];
    cout<<endl;
  }
  return 0;
}