#include using namespace std; int main(){ string s,s2; cin >> s >> s2; if(s=="0"&&s2=="0" || s=="2"&&s2=="2") cout << "E"; else if(s=="0"||s2=="0"||s=="1"||s2=="1") cout << "S"; else cout << "P"; cout << endl; return 0; }