import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [h,w] <- map (read::String->Int) . words <$> getLine
  s <- lines <$> getContents
  let frame1 = (replicate w '#') : s ++ [replicate w '#']
  putStrLn $ unlines $map ((++"#").('#':)) frame1