/*
after dusk passed,
there is a starry sky.
*/
#include <bits/stdc++.h>
#define inf 0x3f3f3f3f
#define m_k make_pair
using namespace std;
const int N=4*1e5+100;
int n,a[N];
char s[N];
inline int read()
{
	int f=1,x=0;char s=getchar();
	while(s<'0'||s>'9'){if(s=='-')f=-1;s=getchar();}
	while(s>='0'&&s<='9'){x=x*10+s-'0';s=getchar();}
	return x*f;
}
inline int cal(int n,int m)
{
	if (m>n) return 0;
	int ans=1;
	for (int i=1;i<=m;i++) ans=ans*(n-i+1)/i;
	return ans;
}
int C(int n,int m)
{
	if (n<3&&m<3) return cal(n,m);
	return C(n/3,m/3)*cal(n%3,m%3)%3;
}
signed main()
{
	n=read();
	scanf("%s",s+1);
	for (int i=1;i<=n;i++)
	{
		if (s[i]=='B') a[i]=0;
		if (s[i]=='R') a[i]=1;
		if (s[i]=='W') a[i]=2;
	}
	int ans=0;
	for (int i=1;i<=n;i++) ans=(ans+a[i]*C(n-1,i-1)%3)%3;
	if (n%2==0) ans=3-ans;
	ans%=3;
	if (ans==0) printf("B\n");
	if (ans==1) printf("R\n");
	if (ans==2) printf("W\n"); 
}

#include<iostream>
using namespace std;
typedef long long ll;
int main()
{
  int n,i;
  ll res=0,x=0,y=1,t;//(n-1)ci=3^x*(3*z+y)
  string s,tm="BWR";
  cin >> n >> s;
  for(i=0;i<n;i++){
    if(x==0){
      if(s[i]=='W')
        res+=y;
      else if(s[i]=='R')
        res+=y*2;
    }
    res%=3;
    if(i==n-1)
      break;
    t=n-1-i;
    while(t%3==0){
      t/=3;
      x++;
    }
    y=(y*t)%3;
    t=i+1;
    while(t%3==0){
      t/=3;
      x--;
    }
    y=(y*t)%3;
  }
  if(n%2==0)
    res=(3-res)%3;
  cout << tm[res] << endl;
  return 0;
}