#include <iostream>
#include <string>

using namespace std;

int main(){
	while(true){
		int n, m;
		cin >> n >> m;
		if(n == 0 && m == 0){ break; }
		char chairs[101];
		for(int i = 0; i < n; i++){ chairs[i] = '#'; }
		chairs[n] = '\0';
		for(int i = 0; i < m; i++){
			string s;
			cin >> s;
			bool flag = false;
			if(s[0] == 'A'){
				for(int j = 0; j < n; j++){
					if(chairs[j] == '#'){ chairs[j] = 'A'; break; }
				}
			}else if(s[0] == 'B'){
				bool flag = false;
				for(int j = n - 1; j >= 0; j--){
					if(chairs[j] != '#'){ continue; }
					if((j < 1 || chairs[j - 1] != 'A') && chairs[j + 1] != 'A'){
						chairs[j] = 'B';
						flag = true;
						break;
					}
				}
				if(!flag){
					for(int j = 0; j < n; j++){
						if(chairs[j] == '#'){ chairs[j] = 'B'; break; }
					}
				}
			}else if(s[0] == 'C'){
				if(i == 0){
					chairs[n / 2] = 'C';
				}else{
					int j = 0;
					for(; j < n; j++){
						if(chairs[j] != '#'){ break; }
					}
					if(chairs[j + 1] == '#'){
						chairs[j + 1] = 'C';
					}else if(j > 0 && chairs[j - 1] == '#'){
						chairs[j - 1] = 'C';
					}else{
						for(; j < n; j++){
							if(chairs[j] == '#'){ break; }
						}
						chairs[j] = 'C';
					}
				}
			}else if(s[0] == 'D'){
				if(i == 0){
					chairs[0] = 'D';
				}else{
					int dist = 0, idx = 0;
					for(int j = 0; j < n; j++){
						if(chairs[j] != '#'){ continue; }
						int d = 100;
						for(int k = j - 1; k >= 0; k--){
							if(chairs[k] != '#'){ d = min(d, j - k); break; }
						}
						for(int k = j + 1; k < n; k++){
							if(chairs[k] != '#'){ d = min(d, k - j); break; }
						}
						if(d > dist){ idx = j; dist = d; }
					}
					chairs[idx] = 'D';
				}
			}
		}
		cout << chairs << endl;
	}
	return 0;
}