#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
char In[1 << 20], *ss = In, *tt = In;
#define getchar() (ss == tt && (tt = (ss = In) + fread(In, 1, 1 << 20, stdin), ss == tt) ? EOF : *ss++)
ll read() {
	ll x = 0, f = 1; char ch = getchar();
	for(; ch < '0' || ch > '9'; ch = getchar()) if(ch == '-') f = -1;
	for(; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + int(ch - '0');
	return x * f;
}
enum col{
	cB = 0,
	cW = 1,
	cR = 2
};
int readc() {
	char ch = getchar();
	for(; ch < 'A' || ch > 'Z'; ch = getchar());
	return ch == 'B' ? cB : (ch == 'W' ? cW : cR);
}
const int MAXN = 400005;
int n, c[MAXN], ans;
int C(int n, int m) {
	if(n < 0 || m < 0 || n < m) return 0;
	if(m == 0) return 1;
	else if(m == 1) return n;
	else return n * (n-1) / 2 % 3;
}
int Lucas(int n, int m) {
	if(m == 0) return 1;
	return Lucas(n / 3, m / 3) * C(n % 3, m % 3) % 3;
}
int main() {
	n = read();
	for(int i = 1; i <= n; i++) c[i] = readc();
	for(int i = 1; i <= n; i++)
		(ans += c[i] * Lucas(n-1, i-1)) %= 3;
	if(~n & 1) ans = (3 - ans) % 3;
	printf(ans == cB ? "B\n" : (ans == cW ? "W\n" : "R\n"));
	return 0;
}

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>

using namespace __gnu_pbds;
using namespace std;

using ll = long long;
using ld = long double;

typedef tree<
        int,
        null_type,
        less<int>,
        rb_tree_tag,
        tree_order_statistics_node_update>
        ordered_set;

#define mp make_pair


int MOD =  1e9 + 7;

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

int add(int a, int b) {
    int s = (a+b);
    if (s>=MOD) s-=MOD;
    return s;
}

int sub(int a, int b) {
    int s = (a+MOD-b);
    if (s>=MOD) s-=MOD;
    return s;
}

int po(int a, ll deg)
{
    if (deg==0) return 1;
    if (deg%2==1) return mul(a, po(a, deg-1));
    int t = po(a, deg/2);
    return mul(t, t);
}

int inv(int n)
{
    return po(n, MOD-2);
}


mt19937 rnd(time(0));


/*const int LIM = 1e6;

vector<int> facs(LIM), invfacs(LIM);

void init()
{
    facs[0] = 1;
    for (int i = 1; i<LIM; i++) facs[i] = mul(facs[i-1], i);
    invfacs[LIM-1] = inv(facs[LIM-1]);
    for (int i = LIM-2; i>=0; i--) invfacs[i] = mul(invfacs[i+1], i+1);
}

int C(int n, int k)
{
    if (n<k) return 0;
    if (n<0 || k<0) return 0;
    return mul(facs[n], mul(invfacs[k], invfacs[n-k]));
}*/

/*
struct DSU
{
    vector<int> sz;
    vector<int> parent;
    void make_set(int v) {
        parent[v] = v;
        sz[v] = 1;
    }

    int find_set(int v) {
        if (v == parent[v])
            return v;
        return find_set(parent[v]);
    }

    void union_sets(int a, int b) {
        find_set(a);
        find_set(b);

        a = find_set(a);
        b = find_set(b);

        if (a != b) {
            if (sz[a] < sz[b])
                swap(a, b);
            parent[b] = a;
            sz[a] += sz[b];
        };
    }

    DSU (int n)
    {
        parent.resize(n);
        sz.resize(n);
        for (int i = 0; i<n; i++) make_set(i);
    }
};*/



int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr);

    int n; cin>>n;
    string s; cin>>s;

    map<char, int> m;
    m['B']=0;
    m['R']=1;
    m['W']=2;

    map<int, char> m1;
    for (auto it: m) m1[it.second]=it.first;

    vector<int> facs(n), degs(n);
    facs[0]=1;
    degs[0]=0;
    for (int i = 1; i<n; i++)
    {
        facs[i] = facs[i-1];
        degs[i] = degs[i-1];
        int i1 = i;
        while (i1%3==0)
        {
            i1/=3; degs[i]++;
        }
        facs[i] = (facs[i]*i1)%3;
    }

    int tot = 0;
    for (int i = 0; i<n; i++)
    {
        int C;
        int deg = degs[n-1] - degs[i] - degs[n-i-1];
        if (deg>0) C=0;
        else C = (facs[n-1]*facs[i]*facs[n-i-1])%3;
        tot+=m[s[i]]*C; tot%=3;

        //cout<<degs[i]<<' '<<C<<' '<<tot<<endl;
    }

    if (n%2==0) tot = (3-tot)%3;

    //cout<<tot<<endl;
    cout<<m1[tot];

}
/*
W
BR
RWB
RRBB

-a1-3a2-3a3-a4

-4 = 2

 */