#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll INF = 1e9+7;
ll MOD = 998244353;
typedef pair<ll,ll> ii;
#define iii pair<ll,ii>
#define f(i,a,b) for(ll i = a;i < b;i++)
#define pb push_back
#define vll vector<ll>
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
///I hope I will get uprating and don't make mistakes
///I will never stop programming
///sqrt(-1) Love C++
///Please don't hack me
///@TheofanisOrfanou Theo830
///Think different approaches (bs,dp,greedy,graphs,shortest paths,mst)
///Stay Calm
///Look for special cases
///Beware of overflow and array bounds
///Think the problem backwards
///AtCoder Regular Contest 117
void YESNO(ll a){cout<<(a ? "YES" : "NO")<<"\n";}
int main(void){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    ll n;
    cin>>n;
    char arr[n];
    ll sum = 0;
    ll b = 1;
    ll num = n-1;
    ll posa[2] = {0};
    ll kato = 1;
    map<char,ll>mp;
    mp['B'] = 0;
    mp['W'] = 1;
    mp['R'] = 2;
    f(i,0,n){
        cin>>arr[i];
        ll bb = b;
        assert(posa[0] >= posa[1]);
        if(posa[0] != posa[1]){
            b = 0;
        }
        if(b < 0){
            b += 3;
        }
        sum += (mp[arr[i]] * b) % 3;
        sum %= 3;
        b = bb;
        ll NUM = num;
        while(NUM % 3 == 0 && NUM != 0){
            posa[0]++;
            NUM /= 3;
        }
        if(NUM % 3 == 2){
            b *= -1;
        }
        NUM = kato;
        while(NUM % 3 == 0 && NUM != 0){
            posa[1]++;
            NUM /= 3;
        }
        if(NUM % 3 == 2){
            b *= -1;
        }
        kato++;
        num--;
    }
    char ans[3] = {'B','W','R'};
    if(n % 2 == 0){
        sum = 3 - sum;
        sum %= 3;
    }
    cout<<ans[sum]<<"\n";
}

#include <bits/stdc++.h>
#define fo(a,b,c) for (a=b; a<=c; a++)
#define fd(a,b,c) for (a=b; a>=c; a--)
#define ll long long
#define add(a,b) a=((a)+(b))%mod
#define mod 3
#define Mod 1
//#define file
using namespace std;

int n,i,j,k,l;
char st[400001];
int a[400001];
int ans;
ll Jc[3];

ll qpower(ll a,int b) {ll ans=1; while (b) {if (b&1) ans=ans*a%mod;a=a*a%mod;b>>=1;} return ans;}

ll cc(int n,int m)
{
	ll ans=1;
	int i;
	fo(i,1,m) ans=ans*(n-i+1)%mod;
	return ans*Jc[m];
}
ll C(int n,int m)
{
//	int s=1,s2=1;
//	fo(i,1,m) s=s*(n-i+1),s2=s2*i;
//	s/=s2;
//	return s%mod;
	
	if (n<m) return 0;
	if (m<3) return cc(n,m);
	return C(n/mod,m/mod)*C(n%mod,m%mod)%mod;
}

int turn(char ch)
{
	if (ch=='R') return 0;
	if (ch=='B') return 1;
	if (ch=='W') return 2;
}
char Turn(int t)
{
	if (t==0) return 'R';
	if (t==1) return 'B';
	if (t==2) return 'W';
}

int main()
{
	#ifdef file
	freopen("c.in","r",stdin);
	#endif
	
	Jc[0]=1;
	fo(i,1,2) Jc[i]=Jc[i-1]*qpower(i,Mod)%mod;
	scanf("%d",&n);
	scanf("%s",st+1);
	fo(i,1,n)
	a[i]=turn(st[i]),add(ans,C(n-1,i-1)*a[i]);
	ans=ans*qpower(2,n-1)%mod;
	
	ans=(ans+mod)%mod;
	cout<<Turn(ans)<<endl;
	
	fclose(stdin);
	fclose(stdout);
	return 0;
}