import Control.Monad

main :: IO ()
main = do
  [p, q] <- map read . words <$> getLine :: IO [Int]
  strs <- replicateM p getLine
  putStrLn $ concat $ replicate (q+2) "#"
  forM_ [0..p-1] $ \i -> do
    let str = "#" ++ (strs !! i) ++ "#"
    putStrLn str
  putStrLn $ concat $ replicate (q+2) "#"
