import Control.Monad

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