#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

void seatA(string& seats)
{
  for (string::iterator it(seats.begin()); it != seats.end(); ++it) {
    if (*it == '#') {
      *it = 'A';
      return;
    }
  }
}

void seatB(string& seats)
{
  string::reverse_iterator fallback = seats.rend();
  for (string::reverse_iterator it(seats.rbegin()); it != seats.rend(); ++it) {
    if (*it == '#') {
      // right
      if ((it == seats.rbegin() || *(it-1) != 'A')
          && (it+1 != seats.rend() || *(it+1) != 'A')) {
        *it = 'B';
        return;
      }
      fallback = it;
    }
  }
  *fallback = 'B';
}

void seatC(string& seats)
{
  for (string::iterator it(seats.begin()); it != seats.end(); ++it) {
    if (*it != '#') {
      if (it != seats.end() && *(it+1) == '#') {
        *(it+1) = 'C';
        return;
      }
      if (it != seats.begin() && *(it-1) == '#') {
        *(it-1) = 'C';
      }
    }
  }
  seats[seats.size()/2] = 'C';
}

void seatD(string& seats)
{
  vector<int> tbl(seats.size(), 1000);
  for (string::size_type i = 0; i < seats.size(); i++) {
    if (seats[i] != '#') {
      for (vector<int>::size_type j = 0; j < tbl.size(); j++) {
        tbl[j] = min(tbl[j], abs(static_cast<int>(i - j)));
      }
    }
  }
  if (tbl.front() == 1000) {
    seats[0] = 'D';
  } else {
    string::size_type pos = 0;
    int m = -1;
    for (string::size_type i = 0; i < seats.size(); i++) {
      if (tbl[i] > m) {
        m = tbl[i];
        pos = i;
      }
    }
    seats[pos] = 'D';
  }
}

int main()
{
  int n, m;
  while (cin >> n >> m && n != 0) {
    string seats(n, '#');
    for (int i = 0; i < m; i++) {
      string s;
      cin >> s;
      if (s == "A") {
        seatA(seats);
      } else if (s == "B") {
        seatB(seats);
      } else if (s == "C") {
        seatC(seats);
      } else {
        seatD(seats);
      }
    }
    cout << seats << endl;
  }
  return 0;
}