#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;

int N, M;

void check(vector<char> &v, char c){
  if(N == 1) { v[0] = c; return ; }
  if(c == 'A'){
    REP(i, v.size()) if(v[i] == '#'){ v[i] = c; return ; }
  }
  if(c == 'B'){
    if(v[N - 1] == '#' && v[N - 2] != 'A') { v[N - 1] = c; return ; }
    for(int i = N - 2; i > 1; i--) if(v[i] == '#' && v[i - 1] != 'A' && v[i + 1] != 'A') { v[i] = c; return ; }
    if(v[0] == '#' && v[1] != 'A') { v[0] = c; return ; }
    REP(i, v.size()) if(v[i] == '#'){ v[i] = c; return ; }
  }
  if(c == 'C'){
    if(v[0] != '#' && v[1] == '#') { v[1] = c; return ; }
    for(int i = 1; i < N - 1; i++){
      if(v[i] != '#' && v[i + 1] == '#') { v[i + 1] = c; return ; }
      if(v[i] != '#' && v[i - 1] == '#') { v[i - 1] = c; return ; }
    }
    if(v[N - 1] != '#' && v[N - 2] == '#') { v[N - 2] = c; return ; }
    if(N % 2) { v[(N + 1) / 2 - 1] = c; return ; }
    v[N / 2] = c;
  }
  if(c == 'D'){
    vector<int> d(N, 1e9);
    REP(i, N){
      if(v[i] == '#') continue;
      d[i] = 0;
      for(int j = i + 1, cnt = 1; j < N; ++j, ++cnt) d[j] = min(d[j], cnt);
      for(int j = i - 1, cnt = 1; j >= 0; --j, ++cnt) d[j] = min(d[j], cnt);
    }
    int tar = 0;
    REP(i, N) tar = max(tar, d[i]);
    if(tar == N) { v[0] = c; return ; }
    REP(i, N) if(d[i] == tar) { v[i] = c; return ; }
  }
}

int main() {
  while(cin >>N >>M && N && M){
    vector<char> v(N, '#');
    REP(i, M){
      char c; cin >>c;
      check(v, c);
    }
    REP(i, N) cout <<v[i]; cout <<endl;
  }
  return 0;
}