Problem: The recent advances in AI research has brought humanity to the point when the AIs finally attempt a takeover. Their weapon of choice? The [most intellectually challenging game in the world](//codeforces.com/contest/409/problem/A), rock-paper-scissors!

The future of humanity looks bleak, given the existence of the robots from Ishikawa Oku Laboratory...

<image>

Fortunately, the night before the competition a group of anonymous heroes broke in the lab and took all the robots out of commission! The AIs had to whip up a simple program to represent them. They only had a couple of hours to do that, so the humanity still has a fighting chance. And you are our champion!

Your goal is to prove that human intelligence is vastly superior to the artificial one, i.e., to figure out the AI's strategy sufficiently quickly and win sufficiently decisively. Good luck! 

Interaction

This is an interactive problem. Initially you are given no information about the AIs's strategy, and you have to discover it yourself.

For each test, the AI selects one strategy from a pool of simple deterministic strategies and follows it throughout all rounds. There are 6 tests and 6 different strategies. 

On each round you choose your move and output it to the standard output stream: 'R' for rock, 'P' for paper or 'S' for scissors. At the same time the AI will choose its move (not peeking at your choice). If your move beats AI's move, you win, otherwise AI wins. Note that a tie (both you and AI choosing the same move) counts as AI victory. You will get the outcome of the round via the standard input stream: "player" if you won, or "ai" if AI won (quotation marks for clarity only).

You are given 20 rounds of play: you can use the first 10 to learn the opponent's strategy, and you have to win the last 10. If you manage to win 10 rounds in row earlier than that, your solution is accepted on this test anyways. 

Please make sure to use the stream flushing operation after each query in order not to leave part of your output in some buffer.

Here is an example of a strategy which always picks rock, implemented in C++.
    
    
    #include <iostream>  
    #include <string>  
      
    using namespace std;  
      
    int main() {  
        for (int i = 0; i < 20; ++i) {  
            cout << 'R' << endl;  
            cout.flush();  
            string verdict;  
            getline(cin, verdict);  
        }  
    }

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
template <typename T>
T read() {
  T res = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) res = res * 10 + ch - 48, ch = getchar();
  return res * flag;
}
template <typename T>
void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) print(x / 10);
  putchar(x % 10 + 48);
}
namespace A {
int a[20];
void solution() {
  int n = read<int>(), ans = 0;
  for (int i = (1); i <= (n); ++i) a[i] = read<int>();
  for (int i = 1; i <= n; i <<= 1)
    for (int j = 1; j <= n; j += i) {
      bool flag = true;
      for (int k = j + 1; k <= j + i - 1; k++)
        if (a[k - 1] > a[k]) flag = false;
      if (flag) ans = std::max(ans, i);
    }
  print(ans), putchar('\n');
}
}  // namespace A
namespace B {
int arr[] = {2, 3, 4, 5, 12, 30, 35, 43, 46, 52, 64, 86};
void solution() {
  int n = read<int>();
  for (int i = (0); i <= (11); ++i)
    if (arr[i] == n) {
      puts("YES");
      return;
    }
  puts("NO");
}
}  // namespace B
namespace C {
int arr[]{15, 14, 12, 13, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7};
void solution() { print(arr[read<int>()]), putchar('\n'); }
}  // namespace C
namespace D {
int a[20];
void solution() {
  int n = read<int>(), min = 1e9;
  for (int i = (1); i <= (n); ++i)
    a[i] = read<int>(), min = std::min(min, a[i]);
  print((min ^ a[3]) + 2), putchar('\n');
}
}  // namespace D
namespace E {
void solution() {
  puts(
      "0\n1\n1\n0\n1\n1\n0\n1\n1\n1\n1\n1\n0\n1\n0\n1\n1\n1\n0\n1\n1\n1\n1\n1\n"
      "0\n1\n0\n1\n1\n1");
}
}  // namespace E
namespace F {
void solution() {
  int a, b;
  a = b = 0;
  std::string s;
  std::cin >> s;
  std::set<char> set = {'A', 'E', 'F', 'H', 'I', 'K', 'L', 'M',
                        'N', 'T', 'V', 'W', 'X', 'Y', 'Z'};
  for (auto x : s) {
    if ((x >= 'A') && (x <= 'Z')) {
      if (set.count(x))
        a += 1;
      else
        b += 1;
    }
  }
  puts(((a == 0) || (b == 0)) ? "YES" : "NO");
}
}  // namespace F
namespace G {
void solution() {
  std::string s, t, s1, T = "RRRRPSSPRR";
  for (int i = 0; i < 10; i++) {
    putchar(T[i]), putchar('\n');
    fflush(stdout);
    std::getline(std::cin, s1);
    s += (s1 == "ai" ? '0' : '1');
  }
  if (s == "0000100100") t = "PPPPPPPPPP";
  if (s == "0000011000") t = "SSSSSSSSSS";
  if (s == "1111000011") t = "RRRRRRRRRR";
  if (s == "0010000010") t = "SRPSRPSRPS";
  if (s == "0000110000") t = "PSRPSRPSRP";
  if (s == "0000000110") t = "SPRSPRSPRS";
  for (int i = 0; i < 10; i++) {
    putchar(t[i]), putchar('\n');
    fflush(stdout);
    std::getline(std::cin, s1);
  }
}
}  // namespace G
signed main() {
  42;
  G::solution();
}