#include <iostream>
#include <algorithm>

using namespace std;

const int INF = 1000000000;

int n, m;
char chairs[100];
int dist[100];
int p;

bool notA(int i){
   if(i == n-1){
      return chairs[i-1] != 'A';
   }else if(i == 0){
      return chairs[i+1] != 'A';
   }else{
      return chairs[i-1] != 'A' && chairs[i+1] != 'A';
   }
}

int checkC(int idx){
   if(idx == n-1){
      if(chairs[idx-1] == '#') return -1;
      return 0;
   }else if(idx == 0){
      if(chairs[idx+1] == '#') return 1;
      return 0;
   }else{
      if(chairs[idx+1] == '#') return 1;
      if(chairs[idx-1] == '#') return -1;
      return 0;
   }
}

void setD(int idx){
   for(int i=0;idx-i>=0;i++){
      dist[idx-i] = min(dist[idx-i], i);
   }
   for(int i=0;idx+i<n;i++){
      dist[idx+i] = min(dist[idx+i], i);
   }
}

void setChar(char c){
   if(n == 1){
      chairs[0] = c;
      return;
   }
   switch(c){
      case 'A':
         for(int i=0;i<n;i++){
            if(chairs[i] != '#') continue;
            chairs[i] = 'A';
            setD(i);
            return;
         }
         break;
      case 'B':
         for(int i=n-1;i>=0;i--){
            if(chairs[i] != '#') continue;
            if(notA(i)){
               chairs[i] = 'B';
               setD(i);
               return;
            }
         }
         for(int i=0;i<n;i++){
            if(chairs[i] == '#') chairs[i] = 'B';
            setD(i);
            return;
         }
         break;
      case 'C':
         if(p == 0){
            if(n&1){
               chairs[(n+1)/2-1] = 'C';
               setD((n+1)/2-1);
            }else{
               chairs[n/2] = 'C';
               setD(n/2);
            }
            return;
         }
         for(int i=0;i<n;i++){
            if(chairs[i] == '#') continue;
            int tmp = checkC(i);
            if(tmp == 1){
               chairs[i+1] = 'C';
               setD(i+1);
               return;
            }else if(tmp == -1){
               chairs[i-1] = 'C';
               setD(i-1);
               return;
            }
         }
         break;
      case 'D':
         int idx = 0;
         int valm = -1;
         for(int i=0;i<n;i++){
            if(chairs[i] != '#') continue;
            if(dist[i] > valm){
               valm = dist[i];
               idx = i;
            }
         }
         chairs[idx] = 'D';
         setD(idx);
         break;
   }
}

main(){
   while(cin >> n >> m && (n || m)){
      fill(dist, dist+n, INF);
      fill(chairs, chairs+n, '#');
      char c;
      for(p=0;p<m;p++){
         cin >> c;
         setChar(c);
      }
      for(int i=0;i<n;i++){
         cout << chairs[i];
      }
      cout << endl;
   }
   return 0;
}