module Main where

import Control.Applicative
import Control.Monad
import Data.List

sharp xs = '#' : xs ++ ['#']

main :: IO ()
main = do
    [h, w] <- fmap read . words <$> getLine :: IO [Int]
    ass <- replicateM h getLine

    putStrLn $ replicate (w + 2) '#'
    mapM_ (putStrLn . sharp) ass
    putStrLn $ replicate (w + 2) '#'