import           Control.Monad
import           Control.Applicative

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

  putStrLn $ replicate (w + 2) '#'
  forM_ s $ \c -> putStrLn $ "#" ++ c ++ "#"
  putStrLn $ replicate (w + 2) '#'