#include #define int long long using namespace std; int n,k,sum,t,x,y,l,r; int q,a,b; signed main(){ cin>>a>>b; k=min(a,b); t=max(a,b); if(k&1){ if(t>k+1){ cout<<"P"; } else{ cout<<"Q"; } } else{ cout<<"P"; } }