#include <iostream>
#include <string>
using namespace std;
#define MAX 100
int main(){
	int seat,people;
	while(1){
		cin>>seat>>people;
		if(seat+people==0 )break;
		string str[101],x;
		for( int i=0 ; i<=MAX ; i++ )
			str[i]="#";
		for( int i=0 ; i<people ; i++ ){
			cin>>x;
			if(x=="A"){
				for( int j=0 ; j<seat ; j++ ){
					if(str[j]=="#"){
						str[j]="A";
						break;
					}
				}
			}

			else if(x=="B"){
				int all_b_sign=0;
				for(int j=seat-1 ; j>=0 ; j-- ){
					if(str[j]=="#"){
						int B_sign=0;
						if(j==0)
							B_sign=1;
						else if(j==seat-1)
							if(str[j-1]!="A")
								B_sign=1;
						else if(str[j+1]!="A"&&str[j-1]!="A")
							B_sign=1;
						if(B_sign==1){
							str[j]="B";
							all_b_sign=1;
							break;
						}
					}
				}
				if(all_b_sign==0){
					for(int j=0 ; j<seat ; j++ ){
						if(str[j]=="#"){
							str[j]="B";
							break;
						}
					}
				}
			}

			else if(x=="C"){
				int c_sign=0;
				for(int j=0 ; j<seat ; j++ ){
					if(str[j]!="#"){
						if(j==seat-1){
							if(str[j-1]=="#"){
								str[j-1]="C";
								c_sign=1;
								break;
							}
						}
						else if(j==0){
							if(str[j+1]=="#"){
								str[j+1]="C";
								c_sign=1;
								break;
							}
						}
						else if(str[j+1]=="#"){
							str[j+1]="C";
							c_sign=1;
							break;
						}
						else if(str[j-1]=="#"){
							str[j-1]="C";
							c_sign=1;
							break;
						}

					}
				}
				if(c_sign==0){
					if(seat%2)
						str[(seat+1)/2]="C";
					else
						str[seat/(2+1)]="C";
				}
			}

			else if(x=="D"){
				if(i==0){
					str[0]="D";
					continue;
				}
				int location,max=0;
				for( int j=seat-1 ; j>=0 ; j-- ){
					int l=j;
					while(l>0){
						if(str[l]!="#"){
							if(max<=j-l){
								max=j-l;
								location=j;
							}
							break;
						}
						l--;
					}
					l=j;
					while(l<seat){
						if(str[l]!="#"){
							if(max<=l-j){
								max=l-j;
								location=j;
							}
							break;
						}
						l++;
					}
				}
				str[location]="D";
			}

		}
		for(int i=0 ; i<seat ; i++ )
			cout<<str[i];
		cout<<endl;
	}
}