import Control.Monad (replicateM, forM_)

main = do
  [h,w] <- fmap read <$> words <$> getLine :: IO[Int]
  ss <- replicateM h getLine
  putStrLn . take (w + 2) . repeat $ '#'
  forM_ ss (\a -> putStrLn $ "#" ++ a ++ "#")
  putStrLn . take (w + 2) . repeat $ '#'
