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

int n, k;
char temp[105];
string s;

char getWin(char a, char b) {
	if (a == 'R') {
		if (b == 'R' || b == 'S') return a;
		else return b;
	} else if (a == 'P') {
		if (b == 'P' || b == 'R') return a;
		else return b;
	} else {
		if (b == 'S' || b == 'P') return a;
		else return b;
	}
}

int main() {
	scanf("%d%d", &n, &k);
	scanf(" %s", temp);
	s = temp;
	for (int i = 0; i < k; i++) {
		s = s + s;
		string ns = "";
		for (int j = 0; j < s.size() - 1; j += 2) {
			ns += getWin(s[j], s[j + 1]);
		}
		s = ns;
	}
	printf("%c\n", s[0]);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int inf = 1001001001;
ll INF = 1001001001001001001;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define rep(i, n) FOR(i, 0, n)
#define all(x) x.begin(), x.end()
#define pb push_back
#define pf push_front
ll MOD = 1000000007;
using P = pair<ll, ll>;

int main() {
    ll t, N;cin >> t >> N;
    ll i = (100*N-1)/t;
    cout << i*(100+t)/100+1 << endl;
    return 0;
}