ll@T,D[8**8];rep(T){ll@N;wt(Divisor(N,D)%2?"P":"K");}