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