import Prelude

main :: IO ()
main = do
  [_, w] <- readInts
  ss <- lines <$> getContents
  let sharps = replicate (w + 2) '#'
  putStrLn sharps
  mapM_ putStrLn $ map (\s -> '#' : s ++ "#") ss
  putStrLn sharps

readInts :: IO [Int]
readInts = map read . words <$> getLine
