#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; int main(){ string a, b; cin >> a >> b; int x=a[0]-'0'; int y=b[0]-'0'; if(x==0 || y==0){ cout << "S" << endl; } else if(x==0 || y==0){ cout << "S" << endl; } else if(x==0 && y==0){ cout << "E" << endl; } else if(x==2 && y==2){ cout << "E" << endl; } else { cout << "P" << endl; } return 0; }