import Control.Monad
import Data.List

main=do
    [h,w]<-map read.words<$>getLine
    as<-replicateM h getLine
    prints (w+2) $ replicate (w+1) '#' ++ concatMap (\s->"##"++s) as ++ replicate (w+3) '#'

prints _ [] = return ()
prints w s = do
    putStrLn $ take w s
    prints w $ drop w s
