#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

int main() {
  int n, m;
  while(cin >> n >> m) {
    if(!n) return 0;
    char a[100] = {};
    rep(j, 0, m) {
      char b;
      cin >> b;
      if(b == 'A') {
        rep(i, 0, n) {
          if(!a[i]) {
            a[i] = b;
            break;
          }
        }
      }else if(b == 'B') {
        dep(i, n - 1, 0) {
          if(a[i]) continue;
          int f = 0;
          if(i + 1 > n) f = 1;
          if(!f && a[i + 1] != 'A') f = 1;
          if(i - 1 < 0 && f) f = 2;
          if(f && a[i - 1] != 'A') f = 2;
          if(f == 2) {
            a[i] = b;
            break;
          }
        }
        rep(i, 0, n) {
          if(!a[i]) a[i] = b;
          break;
        }
      }else if(b == 'C') {
        int f = 0;
        rep(i, 0, n - 1) {
          if(!a[i]) continue;
          if(i + 1 < n && !a[i + 1]) {
            a[i + 1] = b;
            f = 1;
            break;
          }else if(i - 1 >= 0 && !a[i - 1]) {
            a[i - 1] = b;
            f = 1;
            break;
          }
        }
        if(!f) {
          if(n % 2) a[(n + 1) / 2 - 1] = b;
          else a[n / 2] = b;
        }
      }else {
        int mm = 0, re = 0, an;
        rep(i, 0, n) {
          if(!a[i]) re++;
          else break;
        }
        if(re > 0) {
          an = 0;
          mm = re - 1;
        }
        re = 0;
        dep(i, n - 1, 0) {
          if(!a[i]) re++;
          else break;
        }
        if(mm < re - 1) {
          an = n - 1;
          mm = re - 1;
        }
        re = 0;
        rep(i, 1, n - 1) {
          if(a[i]) continue;
          int l = 0, r = 0;
          dep(k, i - 1, 0) {
            if(!a[k]) l++;
            else break;
          }
          rep(k, i + 1, n) {
            if(!a[k]) r++;
            else break;
          }
          if(mm < min(l, r)) {
            an = i;
            mm = min(l, r);
          }
        }
        if(mm) a[an] = b;
        else {
          rep(i, 0, n) {
            if(!a[i]) {
              a[i] = b;
              break;
            }
          }
        }
      }
    }
    rep(i, 0, n) {
      if(a[i] == 'A' || a[i] == 'B' || a[i] == 'C' || a[i] == 'D') {
        cout << a[i];
      }else cout << '#';
    }
    cout << endl;
  }

}