#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
#define INF 1000000010
#define EPS 1e-9
#define F first
#define S second

#define debug(x) cout<<x<<endl;
#define repi(i,x,n) for(int i=x;i<n;i++)
#define rep(i,n) repi(i,0,n)
#define lp(i,n) repi(i,0,n)
#define repn(i,n) for(int i=n;i>=0;i--)
#define int long long
#define endl "\n"

typedef pair<int,int> PII;
typedef pair<int,string> PIS;
typedef pair<string,int> PSI;

template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b; 
    return true;
  }
  return false;
}

template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

char calc(char c,char d){
  if(c==d) return c;
  else{
    if(c=='B'){
      if(d=='W') return 'R';
      else return 'W';
    }else if(c=='W'){
      if(d=='B') return 'R';
      else return 'B';
    }else{
      if(d=='W') return 'B';
      else return 'W';
    }
  }
}


signed main(){
  //cin.tie(0);	
  //ios::sync_with_stdio(false);
  int n;
  cin>>n;
  string s;
  cin>>s;
  vector<int> trg;
  int num=1;
  while(num<400000){
    trg.push_back(num);
    num*=3;
  }
  trg.push_back(num*3);
  int now=0;
  string nxt="";
  while(s.size() != 1){
    now=0;
    while( (s.size()-1) % trg[now+1] == 0) now++;
    //cout<<s<<" "<<now<<endl;
      
      nxt="";
      //cout<<trg[now-1]<<endl;
      for(int i=0;i<s.size()-trg[now];i+=trg[now]){
	nxt+=calc(s[i],s[i+trg[now]]);
	
      }
      s=nxt;
    //cout<<s<<endl;
  }
  cout<<s<<endl;

  return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N=400010;
int a[N];
const int mod=3;
int n;
ll qmi(ll a, ll k){
	ll res = 1;
	while(k){
		if(k & 1) res = res * a % mod;
		a = a * a % mod;
		k >>= 1;
	}
	return res;
}
ll C(ll a, ll b, ll p){
	if(b > a) return 0;
	ll res = 1;
	for(int i = 1, j =a;i<=b;i++,j--){
		res = res * j % p;
		res = res * qmi(i, p - 2) % p;
	}
	return res;
}
ll lucas(ll a, ll b, ll p){
	if(a < p && b < p) return C(a, b, p);
	return C(a % p, b % p, p) * lucas(a / p, b / p, p) % p;
}
int main(){
    scanf("%d",&n);
    getchar();
    char ch;
    for(int i=1;i<=n;i++){
        scanf("%c",&ch);
        if(ch=='B')a[i]=0;
        else if(ch=='W')a[i]=1;
        else a[i]=2;
    }
    ll ans=0;
    for(int i=1;i<=n;i++){
        ans=(ans+lucas(n-1,i-1,mod)*a[i])%mod;
    }
    if(n%2==0)ans=-ans;
    ans=(ans+mod)%mod;
    if(ans==0)printf("B\n");
    else if(ans==1)printf("W\n");
    else printf("R\n");
}