#include using namespace std; using ll = long long; int main(void){ int t; cin >> t; vector query(t); for(auto& n : query){ cin >> n; } for(ll n : query){ char ans = (n == 1) ? 'P' : 'K'; cout << ans << endl; } return 0; }