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