#line 1 "Contests/AtCoder_abc200/abc200_b/main.cpp"
using namespace std;
#line 2 "library/bits/stdc++.h"

// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
#line 3 "Contests/AtCoder_abc200/abc200_b/main.cpp"

#define ll long long

void solve(){
    // write your solution here.
}

int main() {
    ll N;
    int K;
    cin >> N >> K;
    for(int i=0; i<K; i++){
        if(N%200==0)    N/=200;
        else{
            N=N*1000+200;
        }
    }
    cout << N << endl;
    return 0;
}

#include <iostream>
#include <string>
#define mod 3
using namespace std;
int n;
string s;
int dp[400000] = { 0 };
int f[400000] = { 0 };
int g[400000] = { 0 };
void compute()
{
    dp[0] = 1;
    f[0] = 0;
    g[0] = 1;
    for (int i = 1; i < n; ++i) {
        f[i] += f[i - 1];
        int j = i;
        while (j % mod == 0) {
            f[i]++;
            j /= mod;
        }
        g[i] = (g[i - 1] * j) % mod;
    }
    for (int i = 1; i < n; ++i) {
        if (f[n - 1] > f[i] + f[n - 1 - i]) {
            dp[i] = 0;
        } else {
            dp[i] = g[n - 1] * g[n - 1 - i] * g[i];
            dp[i] %= mod;
        }
    }
}
int convert(char c)
{
    if (c == 'B')
        return 0;
    if (c == 'R')
        return 1;
    if (c == 'W')
        return 2;
}
char revert(int num)
{
    if (num == 0)
        return 'B';
    if (num == 1)
        return 'R';
    if (num == 2)
        return 'W';
}
int main()
{
    cin >> n >> s;
    compute();
    int res = 0;
    for (int i = 0; i < n; ++i) {
        res += dp[i] * (convert(s[i])) % mod;
    }
    if ((n - 1) % 2) {
        res = -res;
    }
    res = ((res % mod) + mod) % mod;
    cout << revert(res) << endl;
}
