#include<iostream>
#include<algorithm>
const int infty = 1<<28;
using namespace std;
int main()
{
  while(true){
    int n,m;
    cin >> n >> m;
    if( n == 0 && m == 0 ) break;
    char C[n+2];
    fill(C,C+n+2,'#');

    //cout << " ---------- " << endl;
    for(int p = 0; p < m; ++p){
      char c;
      cin >> c;
      /*for(int i = 1; i < 1+n; ++i){
	cout << C[i];
      }
      cout << endl;
      */
      if(c=='A'){
	for(int i = 1; i < 1+n; ++i){
	  if( C[i] == '#' ){
	    C[i] = 'A';
	    break;
	  }
	}
      }else if(c=='B'){
	bool sc=false;
	for(int i = n; i >= 1; --i){
	  if( C[i] == '#' && C[i-1] != 'A' && C[i+1] != 'A' ){
	    C[i] = 'B';
	    sc=true;
	    break;
	  }
	}
	if(!sc){
	  for(int i = 1; i < n+1; ++i){
	    if( C[i] == '#' ){
	      C[i] = 'B';
	      break;
	    }
	  }
	}
      }else if(c=='C'){
	bool sc = false;
	for(int i = 1; i < 1+n; ++i){
	  if( C[i] != '#' ){
	    if( C[i+1] != '#' ){
	      if( C[i-1] != '#' ){
		continue;
	      }else{
		C[i-1] = 'C';
		sc=true;
		break;
	      }
	    }else{
	      C[i+1] = 'C';
	      sc=true;
	      break;
	    }
	  }
	}
	if( !sc ){
	  if( n % 2 == 0 ){
	    C[ n/2 + 1 ] = 'C';
	  }else{
	    C[ (n+1)/2 ] = 'C';
	  }
	}
      }else if(c=='D'){
	int max_dist = -1;
	int nearest_dist[n+2];
	fill(nearest_dist,nearest_dist+n+2,infty);
	bool empty=true;
	for(int i = 1; i < 1+n; ++i){
	  if( C[i] != '#' ) empty=false;
	}
	if(empty){C[1]='D';continue;}
	
	for(int i = 1; i < 1+n; ++i){
	  if( C[i] != '#' ) continue;
	  int min_right = infty, min_left = infty;
	  for(int j = i - 1; j >= 1; --j){
	    if( C[j] != '#'){
	      min_left = i - j - 1;
	      break;
	    }
	  }
	  for(int j = i + 1; j < 1+n; ++j){
	    if( C[j] != '#' ){
	      min_right = j - i - 1;
	      break;
	    }
	  }

	  nearest_dist[i] = min( min_right, min_left );
	  max_dist = max( max_dist, nearest_dist[i] );
	}
	for(int i = 1; i < i+n; ++i){
	  //cout << nearest_dist[i] << ' ' << max_dist << endl;
	  if( nearest_dist[i] == max_dist ){
	    C[i] = 'D';
	    break;
	  }
	}
      }
    }
    for(int i = 1; i < 1+n; ++i){
      cout << C[i];
    }
    cout << endl;
  }
  return 0;
}