import Data.List
import Control.Applicative

main = do
  [h,w] <- map read . words <$> getLine
  interact $ \input -> unlines $
    replicate (w+2) '#' :
    map (\line -> '#' : line ++ "#") (lines input) ++
    [replicate (w+2) '#']
  