#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; for (int i = 0; i < t; i++){ long long n; cin >> n; if (n == 1 || n == 3){ cout << "P" << endl; } else{ cout << "K" << endl; } } return 0; }