#include<bits/stdc++.h>
#include<iomanip>
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define RNG(i, s, n) for(int i = s;i <= n;i++)
#define _RNG(i, e, s) for(int i = e;i >= s;i--)
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define dup(x, y) (x + y - 1) / (y)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define lb(x, key) lower_bound(all(x) , (key))
#define ub(x, key) upper_bound(all(x) , (key))
#define _size(v) int((v).size())

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

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

using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vpi = vector<pi>;
using vpl = vector<pl>;

#define debug(arr) cout << #arr << " = " << arr << '\n'
#define debug2(a, b) cout<<"["<<#a<<","<<#b<<"] = "<<"["<<a<<","<<b<<"]\n"
#define debug3(a, b, c) cout<<"["<<#a<<","<<#b<<","<<#c<<"] = "<<"["<<a<<","<<b<<","<<c<<"]\n"

template<class T>
ostream &operator<<(ostream &out, const vector<T> &arr) {
    cout << "{";
    for (int i = 0; i < arr.size(); i++)cout << (!i ? "" : ", ") << arr[i];
    cout << "}";
    return out;
}

template<class T>
ostream &operator<<(ostream &out, const vector<vector<T> > &arr) {
    cout << "{\n";
    for (auto &vec : arr)cout << "  " << vec << ",\n";
    cout << "}";
    return out;
}

template<class S, class T>
ostream &operator<<(ostream &out, const pair<S, T> &p) {
    cout << "{" << p.first << "," << p.second << "}" << '\n';
    return out;
}

template<class T>
istream &operator>>(istream &in, vector<T> &arr) {
    for (auto &i : arr)cin >> i;
    return in;
}

template<class S, class T>
istream &operator>>(istream &in, pair<S, T> &p) {
    cin >> p.first >> p.second;
    return in;
}

template<class T>
T binom_lucas(T n, T k, T p) {
    auto f = [&](T n, T k) {
        if (n < 0 || k < 0 || n < k) return 0;
        T res = 1;
        for (int i = 1; i <= k; i++) {
            res = (res * T(n + 1 - i));
            res /= T(i);
            res %= p;
        }
        return res;
    };
    T res = 1;
    while (n) {
        res = res * f(n % p, k % p);
        n /= p;
        k /= p;
        res %= p;
    }
    return res;
}

int main(int argc, char const *argv[])
{
	int N;
	string s;
	cin >> N >> s;

	map<char , int> M;
	M['R'] = 0,M['B'] = 1,M['W'] = 2;

	ll sum = 0;
	REP(i,N)
	{
		sum += binom_lucas(N-1,i,3) * M[s[i]];
		// debug(binom_lucas(N-i,i,3));
		sum %= 3;
	}

	// debug(sum);

	if(N % 2 == 0)
	{
		sum = (3 - sum) % 3;
	}

	string A = "RBW";
	cout << A[sum] << endl;

	return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;

const ll MOD = 1e9+7;
ll modpow(ll a, ll n, ll p) {
    ll res = 1;
    while (n) {
        if (n & 1) res = res * a % p;
        a = a * a % p;
        n >>= 1;
    }
    return res;
}
ll modinv(ll a, ll p = MOD) { return modpow(a, p-2, p); }

vvll cross(vvll &a, vvll &b) {
  int n = (int)a.size();
  int m = (int)b.size();
  int nm = (int)a[0].size();
  vvll res(n,vll(m,0));
  rep(i,n) rep(j,m) rep(k,nm) ( res[i][j] += a[i][k] * b[k][j] ) %= MOD;
  return res;
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    ll n, m, k; cin >> n >> m >> k;
    vvll a(n,vll(1)); rep(i,n) cin >> a[i][0];
    vvll dp(n,vll(n,0)); rep(i,n) dp[i][i] = 1;
    rep(i,m) {
      ll s, t; cin >> s >> t; s--; t--;
      ( dp[s][s] -= modinv( 2 * m ) - MOD ) %= MOD;
      ( dp[s][t] += modinv( 2 * m ) ) %= MOD;
      ( dp[t][t] -= modinv( 2 * m ) - MOD ) %= MOD;
      ( dp[t][s] += modinv( 2 * m ) ) %= MOD;
    }
    while ( k ) {
      if ( k & 1 ) a = cross( dp, a );
      dp = cross( dp, dp );
      k >>= 1;
    }
    rep(i,n) cout << a[i][0] << endl;
    return 0;
}