main :: IO ()
main = do
  [_,w] <- map read . words <$> getLine :: IO [Int]
  rec <- lines <$> getContents :: IO [String]
  putStrLn $ replicate (w+2) '#'
  mapM_ (\l -> putStrLn $ "#" ++ l ++ "#") rec 
  putStrLn $ replicate (w+2) '#'