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>
using namespace std;
int modInverse(int a, int m);
int gcd(int a, int b);
int power(int x, unsigned int y, unsigned int m);
void pairsort(int a[], int b[], int n);
int logint(int x, int y);
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int power(int x, unsigned int y, unsigned int m) {
  if (y == 0) return 1;
  int p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
int modInverse(int a, int m) {
  int m0 = m;
  int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    int q = a / m;
    int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
void pairsort(int a[], int b[], int n) {
  pair<int, int> pairt[n];
  for (int i = 0; i < n; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + n);
  for (int i = 0; i < n; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
int logint(int x, int y) {
  int ans = 0;
  int a = 1;
  for (int i = 0; i < x; i++) {
    if (x <= a) {
      return ans;
    }
    ans++;
    a *= y;
  }
  return -1;
}
int xd(char c) {
  cout << c << endl;
  string s;
  cin >> s;
  if (s == "player")
    return 1;
  else
    return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  char c[3] = {'R', 'P', 'S'};
  int r[10];
  r[0] = xd('R');
  r[1] = xd('R');
  r[2] = xd('P');
  r[3] = xd('P');
  r[4] = xd('S');
  r[5] = xd('S');
  r[6] = xd('P');
  r[7] = xd('P');
  r[8] = xd('R');
  r[9] = xd('R');
  if (r[0] == 0 && r[1] == 0 && r[2] == 1 && r[3] == 1 && r[4] == 0 &&
      r[5] == 0 && r[6] == 1 && r[7] == 1 && r[8] == 0 && r[9] == 0) {
    for (int i = 0; i < 10; i++) {
      xd(c[1]);
    }
  } else if (r[0] == 0 && r[1] == 0 && r[2] == 0 && r[3] == 0 && r[4] == 1 &&
             r[5] == 1 && r[6] == 0 && r[7] == 0 && r[8] == 0 && r[9] == 0) {
    for (int i = 0; i < 10; i++) {
      xd(c[2]);
    }
  } else if (r[0] == 1 && r[1] == 1 && r[2] == 0 && r[3] == 0 && r[4] == 0 &&
             r[5] == 0 && r[6] == 0 && r[7] == 0 && r[8] == 1 && r[9] == 1) {
    for (int i = 0; i < 10; i++) {
      xd(c[0]);
    }
  } else if (r[0] == 0 && r[1] == 0 && r[2] == 0 && r[3] == 1 && r[4] == 1 &&
             r[5] == 0 && r[6] == 1 && r[7] == 0 && r[8] == 1 && r[9] == 0) {
    int t = 2;
    for (int i = 0; i < 10; i++) {
      xd(c[t]);
      t++;
      t %= 3;
    }
  } else if (r[1] == 0 && r[2] == 1 && r[3] == 0 && r[4] == 1 && r[5] == 0 &&
             r[6] == 0 && r[7] == 0 && r[8] == 0 && r[9] == 0) {
    int t = 1;
    for (int i = 0; i < 10; i++) {
      xd(c[t]);
      t++;
      t %= 3;
    }
  } else if (r[1] == 0 && r[2] == 0 && r[3] == 0 && r[4] == 0 && r[5] == 0 &&
             r[6] == 1 && r[7] == 0 && r[8] == 1 && r[9] == 0) {
    int t = 2;
    for (int i = 0; i < 10; i++) {
      xd(c[t]);
      t += 2;
      t %= 3;
    }
  }
  return 0;
}