
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, char> plc;

int main()
{
	int m, n;
	while (cin >> n >> m, n, m) 
	{
		int a[110] = { 0 };
		for (int i = 0; i < m; i++) 
		{
			char c; cin >> c;
			if (c == 'A') 
			{
				for (int j = 0; j < n; j++)if (!a[j]) { a[j] = 1; break; }
			}
			if (c == 'B') 
			{
				for (int j = n - 1; j >= 0; j--)if (!a[j]) { a[j] = 2; break; }
			}
			if(c == 'C')
			{
				if (!i)a[n / 2] = 3;
				else
				{
					for (int j = 0; j < n; j++) 
					{
						if (j != n - 1 && a[j] && !a[j + 1]) { a[j + 1] = 3; break; }
						if (j && a[j] && !a[j - 1]) { a[j - 1] = 3; break; }
					}
				}
			}
			if (c == 'D') 
			{
				if (!i)a[0] = 4;
				else
				{
					int mc = -1, mi = -1, x, y;
					for (int j = 0; j < n; j++) 
					{
						x = y = 999;
						for (int k = j; k >= 0; k--)if (a[k]) { x = j - k; break; }
						for (int k = j; k < n; k++)if (a[k]) { y = k - j; break; }
						if (x > y)x = y;
						if (mc < x)mc = x, mi = j;
					}
					a[mi] = 4;
				}
			}
		}
		for (int j = 0; j < n; j++)putchar("#ABCD"[a[j]]);
		puts("");
	}
	return 0;
}