n=input() p='P'*n for s in p*3,p+" "*n+p,p*3,p,p:exec"print s;"*n