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