#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>

using namespace std;

typedef pair<int, int> ii;
typedef vector<int> vi;
typedef long long ll;

#define f first
#define s second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rsz resize

const int md = 3;
const ll inf = 1e18;
const int maxn = 4e5+5;

template<class T> void ckmin(T &a, T b) { a = min(a, b); }
template<class T> void ckmax(T &a, T b) { a = max(a, b); }

char st[maxn];

void add(int &a, int b)
{
	a += b;
	if(a>= md)
	{
		a -= md;
	}
}

int mul(int a, int b)
{
	return (1LL*a*b)%md;
}

vector<int> get3(int x)
{
	vector<int> res;
	while(x)
	{
		res.pb(x%3);
		x /= 3;
	}
	return res;
}

int main()
{
	int n; scanf("%d", &n);
	scanf("%s", st);

	vi base = get3(n-1);
	int res = 0;
	for(int i = 0; i< n; i++)
	{
		int val = 0;
		if(st[i] == 'W') val = 1;
		else if(st[i] == 'R') val = 2;
		vi x = get3(i);

		int nck = 1;

		for(int j = 0; j< min((int) x.size(), (int) base.size()); j++)
		{
			int a = base[j], b = x[j];
			int fac = 0;
			if(a< b) fac = 0;
			else if(a == b || b == 0) fac = 1;
			else fac = 2;
			nck = (nck*fac)%3;
		}

		add(res, mul(val, nck));
	}
	if(n%2 == 0) res = -res;
	res %= 3;
	if(res< 0) res += 3;
	if(res == 0) puts("B");
	else if(res == 1) puts("W");
	else puts("R");
}
#include <bits/stdc++.h>
#include <numeric>

using namespace std;

// using mint = long double;
// using mint = modint998244353;
// using mint = modint1000000007;

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<P, ll> T;
typedef pair<ll, vector<ll>> Pd;

const ll INF = 4e18;
const ll fact_table = 3200008;

priority_queue<ll> pql;
priority_queue<P> pqp;
// big priority queue
priority_queue<ll, vector<ll>, greater<ll>> pqls;
priority_queue<P, vector<P>, greater<P>> pqps;
// small priority queue
// top pop

ll dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
ll dy[8] = {0, 1, 0, -1, -1, 1, 1, -1};
//↓,→,↑,←

/*
#define endl "\n"
#ifdef ENJAPMA
#undef endl
#endif
*/

#define p(x) cout << x << endl;
#define el cout << endl;
#define pe(x) cout << x << " ";
#define ps(x) cout << fixed << setprecision(25) << x << endl;
#define pu(x) cout << (x);
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define pc(x) cout << x << ",";
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rep2(i, a, b) for (ll i = a; i <= (b); i++)
#define rep3(i, a, b) for (ll i = a; i >= (b); i--)
#define all(c) begin(c), end(c)

typedef vector<ll> vec;
typedef vector<vector<ll>> mat;

// vec v(n) -> 長さnのベクトルを宣言
// mat dp(h, vec(w)) -> h * w の行列を宣言

// const ll mod = 998244353ll;
const ll mod = 3ll;

ll mypow(ll a, ll b, ll m = mod) {
    ll x = 1;
    while (b) {
        while (!(b & 1)) {
            (a *= a) %= m;
            b >>= 1;
        }
        (x *= a) %= m;
        b--;
    }
    return x;
}
vec rv(ll read) {
    vec res(read);
    for (int i = 0; i < read; i++) {
        cin >> res[i];
    }
    return res;
}
/*
ll fact[fact_table + 5], rfact[fact_table + 5];

void c3_init() {
    fact[0] = rfact[0] = 1;
    for (ll i = 1; i <= fact_table; i++) {
        fact[i] = (fact[i - 1] * i) % mod;
    }
    rfact[fact_table] = mypow(fact[fact_table], mod - 2, mod);
    for (ll i = fact_table; i >= 1; i--) {
        rfact[i - 1] = rfact[i] * i;
        rfact[i - 1] %= mod;
    }
    return;
}
ll c3(ll n, ll r) {
    return (((fact[n] * rfact[r]) % mod) * rfact[n - r]) % mod;
}
*/
bool icpc = false;
bool multicase = false;

// 配列の長さ、取り間違えてない？
ll n;
string s;
ll dp[10][10];

ll cc3(ll m, ll n) {
    ll value = 1ll;
    for (int i = 0; i < 100; i++) {
        ll mi = m % 3, ni = n % 3;
        value *= dp[mi][ni];
        value %= 3;
        m /= 3ll;
        n /= 3ll;
    }
    return value;
}

bool solve() {
    cin >> n;
    cin >> s;
    dp[0][0] = 1, dp[0][1] = 0, dp[0][2] = 0;
    dp[1][0] = 1, dp[1][1] = 1, dp[1][2] = 0;
    dp[2][0] = 1, dp[2][1] = 2, dp[2][2] = 1;
    ll sum = 0;
    ll c3 = 1ll;
    rep(i, n) {
        ll value = 0;
        if (s[i] == 'B') value = 1;
        if (s[i] == 'W') value = 2;
        sum += value * cc3(n - 1, i);
    }

    sum %= 3;
    if ((n - 1) % 2 == 1) {
        sum = (3 - sum) % 3;
    }
    vector<char> ans = {'R', 'B', 'W'};
    p(ans[sum % 3]);
    return true;
}

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

    if (icpc) {
        while (solve())
            ;
        return 0;
    }
    ll q, testcase = 1;
    if (multicase) {
        cin >> q;
    } else {
        q = 1;
    }
    while (q--) {
        // cout << "Case #" << testcase << ": ";
        solve();
        testcase++;
    }

    // solve();
    return 0;
}