main :: IO ()
main = do
  [_, w] <- map read . words <$> getLine
  ss <- lines <$> getContents
  let sharp = replicate (w+2) '#'
      ss' = sharp:(map (\s -> '#':s ++ ['#']) ss) ++ [sharp]
  mapM_ putStrLn ss'