main=do n<-readLn mapM putStrLn$(<*[1..n])<$>lines"PPP\nP P\nPPP\nP\nP"<*[1..n]