#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) swap(A,B); char ans = 'P'; if(B-A == 1) if(A % 2 == 1) ans = 'Q'; if(B == A) if(A % 2 == 1) ans = 'Q'; cout << ans << "\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;