import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String A = scan.next(); String B = scan.next(); scan.close(); if(A.equals("0") && B.equals("0")) { System.out.println("E"); }else if((A.equals("2") && B.equals("2"))) { System.out.println("E"); }else if(A.equals("0") || B.equals("0") ||A.equals("1") || B.equals("1")) { System.out.println("S"); }else { System.out.println("P"); } } }