import Control.Monad
 
main = do
  [h, w] <- map read . words <$> getLine
  ass <- replicateM h getLine
  putStr . take (w + 2) $ repeat '#'
  mapM_ putWithFrame ass
  putStr . take (w + 2) $ repeat '#'
 
putWithFrame xs = putStr $ "#" ++ xs ++ "#"