#include <iostream>
#include <cstring>
using namespace std;

#define REP(i,n,m) for(int i=n;i<m;i++)
#define rep(i,n) REP(i,0,n)

int n;
char s[104];

int A(void){
	rep(i,n) if(s[i] == '#') return i;
	return -1;
}

int B(void){
	for(int i=n-1;i>=0;i--){
		if(s[i] == '#'){
			int l = i - 1;
			int r = i + 1;
			if(l >= 0 && s[l] == 'A') continue;
			if(r < n && s[r] == 'A') continue;

			return i;
		}
	}

	return -1;
}

int C(void){
	rep(i,n){
		if(s[i] != '#'){
			int l = i - 1;
			int r = i + 1;
			if(r < n && s[r] == '#') return r;
			if(l >= 0 && s[l] == '#') return l;
		}
	}

	return -1;
}

int D(void){
	int res = -1;
	int maxDist = 0;

	rep(i,n){
		if(s[i] == '#'){
			int ldist;
			int rdist;

			for(ldist=i-1;ldist>=0 && s[ldist]=='#';ldist--);
			for(rdist=i+1;rdist<n && s[rdist]=='#';rdist++);

			if(ldist < 0) ldist = i;
			if(rdist >= n) rdist = i;

			ldist = i - ldist;
			rdist = rdist - i;

			if(maxDist < min(ldist==0?999:ldist,rdist==0?999:rdist)){
				res = i;
				maxDist = min(ldist==0?999:ldist,rdist==0?999:rdist);
			}
		}
	}

	return res;
}

int main(void){
	int m;

	while(cin>>n>>m && (n||m)){
		memset(s,'#',sizeof(s));

		rep(i,m){
			int idx;
			char ch;
			cin>>ch;

			switch(ch){
			case 'A':
				s[A()] = 'A';
				break;
			case 'B':
				idx = B();
				s[(idx == -1 ? A() : idx)] = 'B';
				break;
			case 'C':
				idx = C();
				s[(idx == -1 ? n/2 : idx)] = 'C';
				break;
			case 'D':
				s[(i == 0 ? 0 : D())] = 'D';
				break;
			}
		}

		rep(i,n) cout<<s[i];
		cout<<endl;
	}

	return 0;
}