#include<cstdio>
#include<iostream> 
using namespace std;
const int N=4e5+5;
char a[N];
const int sum='B'+'W'+'R';
inline char ch(char x,char y)
{
	if(x==y)return x;
	return sum-x-y;
}
int main()
{
	int n;cin>>n>>a+1;
	for(int i=177147;i;i/=3)
	{
		if(n<=i)continue;
		for(int j=1;j<=n-i;++j)
		a[j]=ch(a[j],a[j+i]);
		n-=i;
		if(n<=i)continue;
		for(int j=1;j<=n-i;++j)
		a[j]=ch(a[j],a[j+i]);
		n-=i;
	}
	for(;n>1;n--)
		for(int i=1;i<n;++i)
		a[i]=ch(a[i],a[i+1]);
	cout<<a[1];
	return 0;
}
#include <iostream>
#include <vector>
using namespace std;

#include <iostream>
#include <cassert>

template<long long mod>
class modint{
private:
  using T = long long;
  T a;
public:
  constexpr modint(const long long x = 0) noexcept : a((x%mod+mod)%mod) {}
  constexpr T& value() noexcept { return a; }
  constexpr const T& value() const noexcept { return a; }
  constexpr modint operator-() const noexcept {
    return modint(0) -= *this;
  }
  constexpr modint operator+(const modint& rhs) const noexcept {
    return modint(*this) += rhs;
  }
  constexpr modint operator-(const modint& rhs) const noexcept {
    return modint(*this) -= rhs;
  }
  constexpr modint operator*(const modint& rhs) const noexcept {
    return modint(*this) *= rhs;
  }
  constexpr modint operator/(const modint& rhs) const noexcept {
    return modint(*this) /= rhs;
  }
  constexpr modint& operator+=(const modint& rhs) noexcept {
    a += rhs.a;
    if(a >= mod) a -= mod;
    return *this;
  }
  constexpr modint &operator-=(const modint& rhs) noexcept {
    if(a < rhs.a) a += mod;
    a -= rhs.a;
    return *this;
  }
  constexpr modint& operator*=(const modint& rhs) noexcept {
    a = a*rhs.a%mod;
    return *this;
  }
  constexpr modint& operator/=(const modint& rhs) noexcept {
    return *this *= rhs.inv();
  }
  constexpr bool operator==(const modint& rhs) const noexcept {
    return a == rhs.a;
  }
  constexpr bool operator!=(const modint& rhs) const noexcept {
    return not (*this == rhs);
  }
  constexpr modint pow(long long k) const noexcept {
    modint ret(1);
    modint x = k > 0 ? *this : this->inv();
    k = abs(k);
    while(k > 0){
      if(k&1) ret *= x;
      x *= x;
      k >>= 1;
    }
    return ret;
  }
  constexpr modint inv() const noexcept {
    return pow(mod-2);
  }
  friend std::ostream& operator<<(std::ostream &os, const modint &X) noexcept {
    return os << X.a;
  }
  friend std::istream& operator>>(std::istream &is, modint &X) noexcept {
    is >> X.a;
    X.a %= mod;
    if(X.a < 0) X.a += mod;
    return is;
  }
};

int main(){
  using mint = modint<3>;
  int n;
  string c;
  cin >> n >> c;
  string C = "BWR";

  vector<vector<mint>> T(3,vector<mint>(3));
  for(int i = 0; i < 3; ++i){
    T[i][0] = 1;
    T[i][i] = 1;
  }
  for(int i = 1; i < 3; ++i){
    for(int j = 1; j < i; ++j){
      T[i][j] = T[i-1][j] + T[i-1][j-1];
    }
  }
  auto comb = [&](int x, int y){
    mint ret = 1;
    while(x > 0 or y > 0){
      int a = x%3, b = y%3;
      ret *= T[a][b];
      x /= 3;
      y /= 3;
    }
    return ret;
  };
  mint t = 0;
  for(int i = 0; i < n; ++i){
    int a = C.find(c[i]);
    t += comb(n-1,i)*a;
  }
  for(int i = 0; i+1 < n; ++i)
    t *= 2;
  cout << C[t.value()] << endl;
}
