#include<bits/stdc++.h>
using namespace std;
#define M 400005
char dr[M];
int a[M],pd[10],ls[M],fc[M],inv[M];
int C(int n,int m){
	if(m==0||m==n)return 1;
	if(ls[n]!=ls[n-m]+ls[m])return 0;
//	cout<<fc[n]<<" "<<inv[m]<<"!!"<<inv[n-m]<<endl;
	return 1ll*fc[n]%3*inv[m]%3*inv[n-m]%3;
}
int main(){
//	freopen("data.in","r",stdin);
//	freopen("pro.out","w",stdout);
	int n;pd[1]=1;pd[2]=2;
	scanf("%d",&n);
	scanf("%s",dr+1);
	for(int i=1;i<=n;++i){
		if(dr[i]=='R')a[i]=0;
		else if(dr[i]=='B')a[i]=1;
		else a[i]=2;
	}
	fc[0]=fc[1]=inv[0]=inv[1]=1;
	for(int i=2;i<=n;++i){
		int t=i;
		while(t%3==0)ls[i]++,t/=3;
		fc[i]=1ll*t*fc[i-1]%3;
		inv[i]=1ll*pd[t%3]*inv[i-1]%3;
	}
	for(int i=1;i<=n;++i)ls[i]+=ls[i-1];
	int ans=0;
	int f=1;
	if((n-1)&1)f=-1;
	for(int i=1;i<=n;++i){
		ans=(ans+1ll*f*C(n-1,i-1)*a[i])%3;
	}ans=(ans%3+3)%3;
	if(ans==0)puts("R");
	else if(ans==1)puts("B");
	else puts("W");
}
#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
inline int my_getchar_unlocked(){
  static char buf[1048576];
  static int s = 1048576;
  static int e = 1048576;
  if(s == e && e == 1048576){
    e = fread_unlocked(buf, 1, 1048576, stdin);
    s = 0;
  }
  if(s == e){
    return EOF;
  }
  return buf[s++];
}
inline void rd(int &x){
  int k;
  int m=0;
  x=0;
  for(;;){
    k = my_getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = my_getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
inline void rd(char &c){
  int i;
  for(;;){
    i = my_getchar_unlocked();
    if(i!=' '&&i!='\n'&&i!='\r'&&i!='\t'&&i!=EOF){
      break;
    }
  }
  c = i;
}
inline int rd(char c[]){
  int i;
  int sz = 0;
  for(;;){
    i = my_getchar_unlocked();
    if(i!=' '&&i!='\n'&&i!='\r'&&i!='\t'&&i!=EOF){
      break;
    }
  }
  c[sz++] = i;
  for(;;){
    i = my_getchar_unlocked();
    if(i==' '||i=='\n'||i=='\r'||i=='\t'||i==EOF){
      break;
    }
    c[sz++] = i;
  }
  c[sz]='\0';
  return sz;
}
struct MY_WRITER{
  char buf[1048576];
  int s;
  int e;
  MY_WRITER(){
    s = 0;
    e = 1048576;
  }
  ~MY_WRITER(){
    if(s){
      fwrite_unlocked(buf, 1, s, stdout);
    }
  }
}
;
MY_WRITER MY_WRITER_VAR;
void my_putchar_unlocked(int a){
  if(MY_WRITER_VAR.s == MY_WRITER_VAR.e){
    fwrite_unlocked(MY_WRITER_VAR.buf, 1, MY_WRITER_VAR.s, stdout);
    MY_WRITER_VAR.s = 0;
  }
  MY_WRITER_VAR.buf[MY_WRITER_VAR.s++] = a;
}
inline void wt_L(char a){
  my_putchar_unlocked(a);
}
inline void wt_L(const char c[]){
  int i=0;
  for(i=0;c[i]!='\0';i++){
    my_putchar_unlocked(c[i]);
  }
}
template<class S, class T> inline S moddw_L(S a, const T b){
  a %= b;
  if(a < 0){
    a += b;
  }
  return a;
}
int N;
char S[400000+2];
int comb(int n, int k){
  int res;
  if(k < 0 || k > n){
    return 0;
  }
  if(n < 3){
    int i;
    res = 1;
    for(i=(0);i<(k);i++){
      res *= n-i;
    }
    for(i=(0);i<(k);i++){
      res /= i+1;
    }
    return res % 3;
  }
  return comb(n/3, k/3) * comb(n%3, k%3);
}
int main(){
  int i;
  int sm = 0;
  rd(N);
  rd(S);
  for(i=(0);i<(N);i++){
    if(S[i]=='B'){
      sm += comb(N-1,i);
    }
    if(S[i]=='R'){
      sm += comb(N-1,i) * 2;
    }
  }
  if(N%2==0){
    sm = -sm;
  }
  (sm = moddw_L(sm,3));
  if(sm==0){
    wt_L("W");
    wt_L('\n');
  }
  else if(sm==1){
    wt_L("B");
    wt_L('\n');
  }
  else{
    wt_L("R");
    wt_L('\n');
  }
  return 0;
}
// cLay version 20210405-1

// --- original code ---
// int N; char S[4d5+2];
// 
// int comb(int n, int k){
//   int res;
//   if(k < 0 || k > n) return 0;
//   if(n < 3){
//     res = 1;
//     rep(i,k) res *= n-i;
//     rep(i,k) res /= i+1;
//     return res % 3;
//   }
//   return comb(n/3, k/3) * comb(n%3, k%3);
// }
// 
// {
//   int sm = 0;
//   rd(N,S);
//   rep(i,N){
//     if(S[i]=='B') sm += comb(N-1,i);
//     if(S[i]=='R') sm += comb(N-1,i) * 2;
//   }
//   if(N%2==0) sm = -sm;
//   sm %%= 3;
//   wt(if[sm==0, "W", sm==1, "B", "R"]);
// }
