#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string A, B;
  cin >> A >> B;
  if ((A == "0" && B == "0") || (A == "2" && B == "2")) {
    cout << 'E' << '\n';
  } else if (A == "1" || B == "1" || A == "0" || B == "0") {
    cout << 'S' << '\n';
  } else {
    cout << 'P' << '\n';
  }
  return 0;
}