import Prelude hiding (abs)
import Control.Monad
import Control.Arrow ((&&&))
import Data.List (nub, sort, group)
import Data.Maybe (fromMaybe)
import qualified Data.IntMap as M

main :: IO ()
main = do
    [h,w] <- (map read . words) <$> getLine
    as <- replicateM h getLine
    mapM_ print $ solve as w

-- |
solve :: [String] -> Int -> [String]
solve as w = [wall] ++ body ++ [wall]
  where
    wall = replicate (w + 2) '#'
    body = map sand as

sand :: String -> String
sand s = "#" ++ s ++ "#"
