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