#include<iostream>

using namespace std;

int n,m;
char seat[100];

void sitA()
{
	for(int i=0;i<n;i++){
		if(seat[i]=='#'){ seat[i]='A'; return; }
	}
}

void sitB()
{
	for(int i=n-1;i>=0;i--){
		if(seat[i]=='#'
		&&!(i+1<n &&seat[i+1]=='A')
		&&!(0<=i-1&&seat[i-1]=='A')){ seat[i]='B'; return; }
	}

	for(int i=0;i<n;i++){
		if(seat[i]=='#'){ seat[i]='B'; return; }
	}
}

void sitC()
{
	for(int i=0;i<n;i++){
		if(seat[i]!='#'){
			if(i+1<n &&seat[i+1]=='#'){ seat[i+1]='C'; return; }
			if(0<=i-1&&seat[i-1]=='#'){ seat[i-1]='C'; return; }
		}
	}
	seat[n/2]='C';
}

void sitD()
{
	int dmax=0,imax;
	for(int i=0;i<n;i++){
		if(seat[i]=='#'){
			int disL=0,disR=0;
			for(int j=i;seat[j]=='#';j--,disL++){
				if(j==0){ disL=10000; break; }
			}
			for(int j=i;seat[j]=='#';j++,disR++){
				if(j==n-1){ disR=10000; break; }
			}
			int dis=min(disL,disR);
			if(dmax<dis)	dmax=dis,imax=i;
		}
	}
	seat[imax]='D';
}

int main()
{
	for(;cin>>n>>m,n||m;){
		for(int i=0;i<n;i++)seat[i]='#';
		for(int i=0;i<m;i++){
			char c;	cin>>c;
			switch(c){
				case 'A':	sitA();	break;
				case 'B':	sitB();	break;
				case 'C':	sitC();	break;
				case 'D':	sitD();	break;
			}
		}
		for(int i=0;i<n;i++)	cout<<seat[i];
		cout<<endl;
	}

	return 0;
}