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