s = input().split(" ") if ((s[0][0] == '0' and s[1][0] != '0') or (s[0][0] != "0" and s[1][0] == '0')) or (s[0] == '1' or s[1] == '1'): print("S") elif (s[0] == "2" and s[1] == "2") or (s[0] == "0" and s[1] == "0"): print("E") else: print("P")