import Control.Monad

main = do
  [h,w] <- map read . words <$> getLine :: IO [Int]
  input <- replicateM h $ getLine :: IO [String]
  let added = map (\x -> "#" ++ x ++ "#") input
  let ans = [replicate (w + 2) '#'] ++ added ++ [replicate (w + 2) '#']
  mapM_ putStrLn ans

  return ()