import java.io.PrintStream; import java.util.Scanner; public class Y441 { Scanner in = new Scanner(System.in); PrintStream out = new PrintStream(System.out); Y441() throws Exception { String A = in.next(); String B = in.next(); if (A.equals(B) && (A.equals("0") || A.equals("1") || A.equals("2"))) { out.println("E"); } else if (A.equals("0") || A.equals("1") || B.equals("0") || B.equals("1")) { out.println("S"); } else { out.println("P"); } } public static void main(String argv[]) throws Exception { new Y441(); } }