#include #include using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main(){ ll a,b; cin >> a >> b; if((a == b) && (a % 2 == 1)) cout << "Q\n"; else if((abs(a-b) == 1) && (a%2 != b%2)) cout << "Q\n"; else cout << "P\n"; return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ ios::sync_with_stdio(false); cin.tie(nullptr); } } ios_do_not_sync_inst;