#include <iostream>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <queue>
#include <map>
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> pii;
typedef pair<ll,ll> pll;
 
 
/*bool compare_function(const pair<int, int> a, const pair<int, int> b)
{
    return a.first < b.first;
}*/
// use case
//sort(V.begin(), V.end(), compare_function);
 
/*struct compare
{
    bool operator ()(const pair<int, int> &a, const pair<int, int> &b) {
    if (a.second-a.first==b.second-b.first)
    {
        return a.first>b.first;
    }
    return a.second-a.first < b.second-b.first;}
};
priority_queue <pair<int,int>, vector <pair<int,int>>, compare> Q;*/
 
void print(vector <ll> X)
{
    for (int i=0; i<X.size(); i++)
    {
        cout<<X[i]<<" ";
    }
    cout<<endl;
    return;
}
 

ll keisk(char x) {
	if (x=='B') {return 0LL;}
	if (x=='R') {return 1LL;}
	return 2LL;
	}

ll kiek(ll a) {
	//cout<<a<<endl;
	ll k=0;
	while (a>0) {
		k+=a/3;
		a=a/3;
		}
	//cout<<a<<" "<<k<<endl;
	return k;
	}
	
ll find(int n, int k, vector <ll> &F, vector <ll> &K) {
	if (K[n]>K[k]+K[n-k]) {return 0LL;}
	if (k==0 || k==n) {return 1LL;}
	return (F[n]*F[k]*F[n-k])%3;
	}
	
char keisk2(ll ats) {
	if (ats==0) {return 'B';}
	if (ats==1) {return 'R';}
	return 'W';
	}
 
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    vector <ll> A(n);
    vector <ll> F(n,1);
    vector <ll> K(n,0);
	for (int i=0;i<n;i++) {
		K[i]=kiek(i);
		}
    for (int i=1;i<n;i++) {
		int j=i;
		while (j%3==0) {j=j/3;}
		F[i]=(F[i-1]*j)%3;
		}
	//print(K);
	//print(F);
    for (int i=0;i<n;i++) {
		char x;
		cin>>x;
		A[i]=keisk(x);
		}
	ll ats=0;
	vector <ll> X(n);
	for (int i=0;i<n;i++) {
		X[i]=find(n-1,i,F,K);
		ats+=X[i]*A[i];
		ats=ats%3;
		}
	//cout<<ats<<endl;
	//print(X);
	if (n%2==0 && ats!=0) {ats=3-ats;}
	char z=keisk2(ats);
	//cout<<ats<<endl;
	cout<<z<<endl;
    return 0;
}

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
using ll=long long int;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
//end

int C[5][5];
int nCr(int n,int r){
   if(C[0][0]==0){
      rep(i,0,5){
         C[i][0]=C[i][i]=1;
         rep(j,1,i){
            C[i][j]=(C[i-1][j-1]+C[i-1][j])%3;
         }
      }
   }
   int res=1;
   rep(_,0,30){
      res*=C[n%3][r%3];
      n/=3,r/=3;
   }
   return res;
}

int main(){
   int n;
   cin>>n;
   string s;
   cin>>s;

   int res=0;
   rep(i,0,n){
      if(s[i]=='R')continue;
      if(s[i]=='W')res=(res+nCr(n-1,i))%3;
      if(s[i]=='B')res=(res+nCr(n-1,i)*2)%3;
   }
   if(!(n&1))res=(3-res)%3;
   if(res==0)puts("R");
   if(res==1)puts("W");
   if(res==2)puts("B");
   return 0;
}