import Control.Monad (replicateM)

main :: IO ()
main = do
    [h, w] <- map read . words <$> getLine
    a <- replicateM h getLine
    putStr . solve $ a

solve :: [String] -> String
solve a = replicate l '#' ++ "\n"
       ++ (concat . map (\s -> "#" ++ s ++ "#\n") $ a)
       ++ replicate l '#' ++ "\n" where
    l = length (head a) + 2