import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)

main :: IO ()
main = do
    [n, w] <- map (fst . fromJust . B.readInt) . B.words <$> B.getLine
    putStrLn $ replicate (w + 2) '#'
    replicateM_ n $ do
        s <- getLine
        putStrLn $ "#" ++ s ++ "#"
    putStrLn $ replicate (w + 2) '#'
