#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <sstream>
#include <climits>
#include <cfloat>
#include <complex>

using namespace std;

int main()
{
	int n, m;
	while (scanf("%d %d", &n, &m), n | m)
	{
		char t[102];	// 1~n
		memset(t, '#', sizeof(t));
		for (int w = 0; w < m; ++w)
		{
			char c;
			scanf(" %c", &c);
			if (c == 'A')
			{
				int i;
				for (i = 1; t[i] != '#'; ++i)
					;
				t[i] = 'A';
			}
			else if (c == 'B')
			{
				int i;
				for (i = n; i >= 1; --i)
					if (t[i-1] != 'A' && t[i] == '#' && t[i+1] != 'A')
						break;
				if (i == 0)
					for (i = 1; t[i] != '#'; ++i)
						;
				t[i] = 'B';
			}
			else if (c == 'C')
			{
				int i;
				if (w == 0)
					i = n / 2 + 1;
				else
				{
					for (i = 2; t[i] != '#'; ++i)
						;
					for (++i; t[i] != '#'; --i)
						;
				}
				t[i] = 'C';
			}
			else
			{
				int i;
				if (w == 0)
					i = 1;
				else
				{
					int dis[102];
					for (int j = 0; j < 102; ++j)
						dis[j] = 100000000;
					for (int j = 1; j <= n; ++j)
					{
						if (t[j] != '#')
							for (int k = 1; k <= n; ++k)
								dis[k] = min(dis[k], abs(j-k));
					}
					int d = 0;
					for (int j = 1; j <= n; ++j)
					{
						if (dis[j] > d)
						{
							i = j;
							d = dis[j];
						}
					}
				}
				t[i] = 'D';
			}
		}
		for (int i = 1; i <= n; ++i)
			putchar(t[i]);
		printf("\n");
	}

	return 0;
}