//うわぁぁん!偶奇間違えたー! #include using namespace std; int main() { int a, b; cin >> a >> b; a--; b--; if (a / 2 == b / 2 && (a % 2 == 0 || b % 2 == 0)) { cout << "Q" << endl; } else { cout << "P" << endl; } return 0; }