#include using namespace std; #define FOR(i,l,r) for(int i = (l);i < (r);i++) #define ALL(x) (x).begin(),(x).end() template bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;} template bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;} typedef long long ll; string A,B; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> A >> B; if((A == "0" && B == "0") || (A == "2" && B == "2")){ cout << "E" << endl; } else if(A == "0" || A == "1" || B == "0" || B == "1"){ cout << "S" << endl; } else{ cout << "P" << endl; } return 0; }