#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int n, m;

void sitA(string& s) {
  for (int i = 0; i < n; i++) {
    if (s[i] != '#') continue;
    s[i] = 'A';
    return;
  }
}

void sitB(string& s) {
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] != '#') continue;
    if (i - 1 >= 0 && s[i - 1] == 'A') continue;
    if (i + 1 < n && s[i + 1] == 'A') continue;
    s[i] = 'B';
    return;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] != '#') continue;
    s[i] = 'B';
    return;
  }
}

void sitC(string& s) {
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') continue;
    if (i + 1 < n && s[i + 1] == '#') {
      s[i + 1] = 'C';
      return;
    }
    if (i - 1 >= 0 && s[i - 1] == '#') {
      s[i - 1] = 'C';
      return;
    }
  }
  if (n & 1) s[(n + 1) / 2 - 1] = 'C';
  else s[n / 2] = 'C';
}

void sitD(string& s) {
  bool none = true;
  for (int i = 0; i < n; i++) {
    none &= s[i] == '#';
  }
  if (none) {
    s[0] = 'D';
    return;
  }
  vector<int> diff(n, 0);
  int diff_max = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] != '#') continue;
    int l = i, r = i;
    while (l >= 0 && s[l] == '#') l--;
    if (l < 0) l = -1000;
    while (r < n && s[r] == '#') r++;
    if (r >= n) r = 1000;
    diff[i] = min(i - l, r - i);
    diff_max = max(diff_max, diff[i]);
  }
  for (int i = 0; i < n; i++) {
    if (diff[i] != diff_max) continue;
    s[i] = 'D';
    return;
  }
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  while (cin >> n >> m, n) {
    string ans = string(n, '#');
    for (int i = 0; i < m; i++) {
      char ch;
      cin >> ch;
      if (ch == 'A') sitA(ans);
      if (ch == 'B') sitB(ans);
      if (ch == 'C') sitC(ans);
      if (ch == 'D') sitD(ans);
    }
    cout << ans << endl;
  }

  return 0;
}
