import Control.Monad

main = do
    [h, w] <- map read . words <$> getLine
    as <- replicateM h getLine
    putStrLn . concat $ replicate (w + 2) "#"
    mapM_ (putStrLn . ("#" ++) . (++ "#")) as
    putStrLn . concat $ replicate (w + 2) "#"