a, b = map(int, input().split()) if (a == 0 and b == 0) or (a == 2 and b == 2): print("E") elif (a == 0 or b == 0) or (a == 1 and b == 1): print("S") else: print("P")