#include #include #include #include #include #include #include #include #include #include #include #include #define mod 1000000007; using namespace std; typedef long long ll; typedef pair Pr; string A, B; int main() { cin >> A >> B; if (A.size() == 1 || B.size() == 1) { if ((A[0] == '2' && B[0] == '2') || (A[0] == '0' && B[0] == '0')) cout << 'E' << endl; else if ((A[0] == '0' || B[0] == '0' || A[0] == 1 || B[0] == '1')) cout << 'S' << endl; }else cout << 'P' << endl; return 0; }