#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
int main(){
	int n,m;
	while(cin>>n>>m,n){
		char input,chair[100];
		rep(i,n)chair[i]='#';
		rep(i,m){
			bool stop=false;
			cin>>input;
			if(input=='A'){
				rep(j,n)if(chair[j]=='#'){
					chair[j]='A';
					break;
				}
			}else if(input=='B'){
				rep(j,n)if(chair[j]=='#'&&(j==0||chair[j-1]!='A')&&(j==n-1||chair[j+1]=='A')){
					chair[j]='B';
					stop=true;
					break;
				}
				if(!stop)rep(j,n)if(chair[j]=='#'){
					chair[j]='B';
					break;
				}
			}else if(input=='C'){
				if(i==0)chair[n/2+1]='C';
				else rep(j,n)if(chair[j]=='#'&&(j==0||chair[j-1]!='#')&&(j==n-1||chair[j+1]!='#')){
					chair[j]='C';
					stop=true;
					break;
				}
				if(!stop)rep(j,n)if(chair[j]=='#'){
					chair[j]='C';
					break;
				}
			}else{
				rep(j,n)if(chair[j]=='#'&&(j==0||chair[j-1]=='#')&&(j==n-1||chair[j+1]=='#')){
					chair[j]='D';
					stop=true;
					break;
				}
				if(!stop)rep(j,n)if(chair[j]=='#'){
					chair[j]='D';
					break;
				}
			}
		}
		rep(i,n)cout<<chair[i];
		cout<<endl;
	}
}
		