import Control.Monad

main = do
    [w, h] <- 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
