import Control.Monad

main :: IO ()
main = do
  [h, w] <- map read . words <$> getLine
  ass <- replicateM h getLine
  let line = replicate (w + 2) '#'
  mapM_ putStrLn $ [line] ++ (map (\r -> "#" ++ r ++ "#") ass) ++ [line]