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 JAVA):

Solution:
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;
import static java.util.Arrays.fill;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Random;
import java.util.StringTokenizer;

public class G {

	static void solve() throws Exception {
		int my[] = new int[20];
		boolean win[] = new boolean[20];
		Random rng = new Random(42);
		for (int i = 0; i < 10; i++) {
			my[i] = rng.nextInt(3);
			out.println("RPS".charAt(my[i]));
			out.flush();
			String s = scanString();
			if (s == null) {
				return;
			}
			switch (s) {
			case "player":
				win[i] = true;
				break;
			case "ai":
				win[i] = false;
				break;
			default:
				return;
			}
		}
		int period[] = null, shift = -1;
		p: for (int p = 1; p <= 4; p++) {
			int cPeriod[] = new int[p];
			for (int i = 0; i < p; i++) {
				boolean can[] = new boolean[3];
				fill(can, true);
				for (int j = i; j < 10; j += p) {
					int t = (my[j] + 2) % 3;
					int t2 = (t + 1) % 3, t3 = (t + 2) % 3;
					if (win[j]) {
						can[t2] = can[t3] = false;
					} else {
						can[t] = false;
					}
				}
				if (!can[0] && !can[1] && !can[2]) {
					continue p;
				}
				cPeriod[i] = can[0] ? 0 : can[1] ? 1 : 2;
			}
			period = cPeriod;
			break;
		}
		if (period == null) {
			i: for (int i = 0; i < 3; i++) {
				for (int j = 0; j < 9; j++) {
					int shifted = (my[j] + i) % 3;
					if ((shifted == (my[j + 1] + 2) % 3) != win[j + 1]) {
						continue i;
					}
				}
				shift = i;
				break;
			}
		}
//		System.err.println(Arrays.toString(period) + " " + shift);
		for (int i = 10; i < 20; i++) {
			if (period != null) {
				my[i] = (period[i % period.length] + 1) % 3;
			} else if (shift >= 0) {
				my[i] = (my[i - 1] + shift + 1) % 3;
			} else {
				my[i] = rng.nextInt(3);
			}
			out.println("RPS".charAt(my[i]));
			out.flush();
			String s = scanString();
			if (s == null) {
				return;
			}
			switch (s) {
			case "player":
				win[i] = true;
				break;
			case "ai":
				win[i] = false;
				break;
			default:
				return;
			}
		}
	}

	static int scanInt() throws IOException {
		return parseInt(scanString());
	}

	static long scanLong() throws IOException {
		return parseLong(scanString());
	}

	static String scanString() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			String l = in.readLine();
			if (l == null) {
				return null;
			}
			tok = new StringTokenizer(l);
		}
		return tok.nextToken();
	}

	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;

	public static void main(String[] args) {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			solve();
			in.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			exit(1);
		}
	}
}