/*
 * src.cpp
 *
 *  Created on: 2016/07/27
 *      Author: joi
 */

#include <bits/stdc++.h>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)

using namespace std;

const int MAX_N=1e2,INF=1e8;

int n,m;

char chairs[MAX_N+1];

int dist(int a){
	int res=INF;
	REP(i,n){
		if (chairs[i]!='#'){
			res=min(res,abs(i-a));
		}
	}
	return res;
}

int main(){
	do{
		cin>>n>>m;
		if (n || m){
			cin.ignore();
			REP(i,n){
				chairs[i]='#';
			}
			chairs[n]=0;
			REP(i,m){
				char c;
				cin>>c;
				switch (c){
				case 'A':{
					REP(i,n){
						if (chairs[i]=='#'){
							chairs[i]='A';
							break;
						}
					}
					break;
				}
				case 'B':{
					int v=-1;
					for (int i=n-1;i>=0;i--){
						if (chairs[i]=='#'){
							if (i!=0){
								if (chairs[i-1]=='A'){
									continue;
								}
							}
							if (i+1!=n){
								if (chairs[i+1]=='A'){
									continue;
								}
							}
							v=i;
							break;
						}
					}
					if (v!=-1){
						chairs[v]='B';
					}else{
						REP(i,n){
							if (chairs[i]=='#'){
								chairs[i]='B';
								break;
							}
						}
					}
					break;
				}
				case 'C':{
					if (i==0){
						if (n%2==1){
							chairs[(n+1)/2-1]='C';
						}else{
							chairs[n/2]='C';
						}
					}else{
						REP(i,n){
							if (chairs[i]!='#'){
								if (i+1!=n && chairs[i+1]=='#'){
									chairs[i+1]='C';
									break;
								}
								if (i!=0 && chairs[i-1]=='#'){
									chairs[i-1]='C';
									break;
								}
							}
						}
					}
					break;
				}
				case 'D':{
					int a=0,d=dist(0);
					FOR(i,1,n){
						if (dist(i)>d){
							a=i;
							d=dist(i);
						}
					}
					chairs[a]='D';
					break;
				}
				}
			}
			cout<<chairs<<endl;
		}
	}while(n || m);
	return 0;
}