importControl.Monad

main = do
  [h, w] <- readNums
  ass <- replicateM h readNums
  putStr . take (w + 2) $ repeat '#'
  mapM_ putWithFrame ass
  putStr . take (w + 2) $ repeat '#'

readNums = map read . words <$> getLine

putWithFrame xs = putStr $ "#" ++ xs ++ "#"