#include<bits/stdc++.h>
#include <stdio.h>
#include <algorithm>

#define all(x) x.begin(),x.end()
#define sc(x) scanf("%d",&x)
#define scl(x) scanf("%lld",&x)
#define LL long long
#define LD long double
#define pb push_back
#define F first
#define S second


const double PI=3.1415926535897932384626433;
const int KL=1e6;
const LL MOD=1e9+7;


using namespace std;

LL n,t,q,x,a[KL],k,m,y,z,sum,b[KL];
vector <pair<pair<LL,LL>,pair<LL,LL>>> vec;

int main()
{
    scl(k);scl(n);scl(m);
    for(int i=1;i<=k;i++){
        scl(a[i]);
        x=a[i]*m;
        x/=n;
        sum+=x;
        y=abs(x*n-a[i]*m);
        z=abs((x+1)*n-a[i]*m);
        vec.pb({{y,z},{i,x}});
    }
    sort(all(vec));
    reverse(all(vec));
    t=m-sum;
    for(int j=1;j<=k;j++){
        int i=j-1;
        if(j<=t){
             b[vec[i].S.F]=vec[i].S.S+1;
        }
        else {
             b[vec[i].S.F]=vec[i].S.S;
        }
    }
    for(int i=1;i<=k;i++)cout<<b[i]<<" ";cout<<endl;




    return 0;
}

// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")
// #pragma GCC optimization ("unroll-loops")

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<cmath>
#include<map>
#include<vector>
#include<unordered_map>
#include<queue>
#include<cstring>
#include<string>
#include<bitset>

#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
typedef pair<double,double>PDD;  
const int INF=0x3f3f3f3f;
const int mod = 1e9+7;
long long mypow(int x,int y)
{
    long long res=1;
    for(int i=1;i<=y;i++)
        res*=x;
    return res;
}

ll gcd(int a,int b)
{
    return b?gcd(b,a%b):a;
}
int getlen(char s[])
{
    int res = 0;
    for(int i=1;s[i]!='\0';i++)
        res++;
    return res;
}
ll qmi(ll a,ll b)
{
    ll res = 1 ;
    while(b)
    {
        if(b&1)
            res = (res * a)%mod ;
        a = (a * a)%mod;
        b>>=1; 
    }
    return res;
}

// int dx [] = {-2,-1,1,2,2,1,-1,-2};    //马路径
// int dy [] = {1,2,2,1,-1,-2,-2,-1};

// int dx [] = {-1,0,1,0};     // 上右下左
// int dy [] = {0,1,0,-1};

// int dy[] = {1,0,-1,0};    // 直角坐标
// int dx[] = {0,1,0,-1};
int n; 
const int N = 4e5+10; 
int qmi(int a, int k, int p)
{
    int res = 1;
    while (k)
    {
        if (k & 1) res = res * a % p;
        a =  a * a % p;
        k >>= 1;
    }
    return res;
}


int C(int a, int b, int p)
{
    if (b > a) return 0;

    int res = 1;
    for (int i = 1, j = a; i <= b; i ++, j -- )
    {
        res = (ll)res * j % p;
        res = (ll)res * qmi(i, p - 2, p) % p;
    }
    return res;
}


int lucas(int a, int b, int p)
{
    if(b==0)
        return 1; 
    if (a < p && b < p) return C(a, b, p);
    return (ll)C(a % p, b % p, p) * lucas(a / p, b / p, p) % p;
}
char s[N]; 
char last[N]; 
int ans = 0; 

void solve()
{
    scanf("%d",&n); 
    scanf("%s",s+1);
    for(int i=1;i<=n;i++)
    {
        int d = 0; 
        char c = s[i];
        if(c=='W')
            d = 0;
        else if(c=='R')
            d = 1; 
        else 
            d = 2;
        ans = (ans + d*lucas(n-1,i-1,3)% 3) % 3; 
    }
    if((n-1)&1)
        ans=(-ans%3+3)%3;  
    char ch ;
    if(ans==0)
        ch = 'W';
    else if(ans==1)
        ch = 'R'; 
    else 
        ch = 'B';
    cout<<ch<<endl;
}
int main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(0);
    solve();
    return 0;
}