#include #include #include #include #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define REP(i,a,n) for(int i = (a);i < (n);i++) #define PI 3.14159265359 #define MOD 1000000007 using namespace std; int main(){ string a,b; cin >> a >> b; if(a == b && (a == "0" || a == "2"))cout << "E\n"; else if(a == "1" || b == "1" || a == "0" || b == "0" )cout << "S\n"; else cout << "P\n"; return 0; }