import Control.Monad
 
main = do
    [h, w] <- map read . words <$> getLine :: IO [Int]
    l <- replicateM h getLine
    let o = [replicate (w+2) '#'] ++ (map (\s -> "#" ++ s ++ "#") l) ++ [replicate (w+2) '#']
    mapM_ putStrLn o