import java.util.Scanner; public class No441 { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.next(); String b = s.next(); int aa = compareWithTwo(a); int bb = compareWithTwo(b); if (aa == 0 && bb == 0) { System.out.println("E"); } else if (aa >= 0 && bb >= 0) { System.out.println("P"); } else { System.out.println("S"); } } private static int compareWithTwo(String str) { if (str.length() == 1) { int num = Integer.parseInt(str); return Integer.compare(num, 2); } return 1; } }