#define _USE_MATH_DEFINES
#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<stack>
#include<cmath>
#include<climits>
using namespace std;

int N, M;
char C;
char chairs[102];

void PutA(){
	for(int i = 1; i <= N; i++){
		if(chairs[i] == '#'){
			chairs[i] = 'A';
			return;
		}
	}
}

void PutB(){
	for(int i = N; i >= 1; i--){
		if(chairs[i+1] != 'A' && chairs[i] == '#' && chairs[i-1] != 'A'){
			chairs[i] = 'B';
			return;
		}
	}
	for(int i = 1; i <= N; i++){
		if(chairs[i] == '#'){
			chairs[i] = 'B';
			return;
		}
	}
}

void PutC(){
	for(int i = 1; i <= N; i++){
		if(chairs[i] != '#'){
			if(chairs[i+1] == '#'){
				chairs[i+1] = 'C';
				return;
			}
			if(chairs[i-1] == '#'){
				chairs[i-1] = 'C';
				return;
			}
		}
	}
	if(N&1) chairs[ (N+1)/2 ] = 'C';
	chairs[N/2 + 1] = 'C';
}

void PutD(){
	int l[102], r[102];
	l[0] = INT_MAX/2; r[N+1] = INT_MAX/2;
	for(int i = 1; i <= N; i++) l[i] = (chairs[i] == '#') ? l[i-1] + 1 : 0;
	for(int i = N; i >= 1; i--) r[i] = (chairs[i] == '#') ? r[i+1] + 1 : 0;

	int ma_idx, ma_d = -1;
	for(int i = 1; i <= N; i++){
		int d = min(l[i], r[i]);
		if(d >= INT_MAX/2) d = INT_MAX;
		if(ma_d < d){
			ma_idx = i; ma_d = d;
		}
	}
	chairs[ma_idx] = 'D';
}

int main(){
	void (*put[4])() = {PutA, PutB, PutC, PutD};

	while(cin >> N >> M, N || M){
		fill_n(chairs, N+2, '#');
		chairs[0] = chairs[N+1] = '.';
		for(int i = 0; i < M; i++){
			cin >> C;
			put[C - 'A']();
			//for(int i = 1; i <= N; i++) printf("%c", chairs[i]); puts("");
		}
		for(int i = 1; i <= N; i++) printf("%c", chairs[i]); puts("");
	}
	return 0;
}