#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
//#include<atcoder/all>
//using namespace atcoder;
#include<iostream>


using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

unsigned char C[4000100];

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	fread(C, 1, 4000100, stdin);
	int N = 0;
	char c = 0;
	auto ci = C;
	while ((c = *ci++) >= '0') N = N * 10 + c - '0';
	auto S = ci;
	rep(i, N) S[i] = (S[i] >> 3 ^ S[i]) & 3;
	N--;

	int k = 0;
	while (N > 0) {
		int K = 1;
		int tmp = N;
		while (tmp >= 3) {
			K *= 3;
			tmp /= 3;
		}

		rep(i, N - K + 1) {
			S[i] += S[i + K];
		}
		N -= K;
		k++;
		if (k % 6 == 0) rep(i, N + 1) S[i] %= 3;
	}

	int tmp = (S[0] % 3);
	if (tmp == 0) cout << 'R';
	else if ((tmp == 2) ^ (k & 1)) cout << 'B';
	else cout << 'W';

	Would you please return 0;
}
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 400010;
char s[MAXN];
const int MOD = 3;
int cnt3[MAXN], pref_cnt3[MAXN];
int fac[MAXN];
int nck_brute (int n, int k) {
	long long ans = 1;
	for (int i = n; i > n - k; i--) ans *= i;
	for (int i = 1; i <= k; i++) ans /= i;
	return ans % 3;
}
int nck(int n, int k) {
	int cnt3_up = pref_cnt3[n] - pref_cnt3[n - k];
	int cnt3_down = pref_cnt3[k];
	if (cnt3_up > cnt3_down) {
		return 0;
	}
	return fac[n] * fac[n - k] * fac[k] % 3;
}
int main() {
	int n;
	scanf("%d", &n);
	fac[0] = 1;
	for (int i = 0; i < n; i++) {
		int p = 0, j = i;
		while (j > 0 && j % 3 == 0) {
			p += 1;
			j /= 3;
		}
		cnt3[i] = p;
		pref_cnt3[i] = (i > 0 ? pref_cnt3[i - 1] : 0) + cnt3[i];
		if (i > 0) {
			fac[i] = fac[i - 1] * j % 3;
		}
	}
	scanf("%s", s + 1);
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		int val = s[i] == 'B' ? 0 : s[i] == 'R' ? 1 : 2;
		int c = nck(n - 1, i - 1);
		ans += c * (n % 2 == 0 ? (3 - val) : val);
	}
	ans %= 3;
	cout << "BRW"[ans] << endl;
	return 0;
}