{-# LANGUAGE BangPatterns #-}
module Main (main) where

import Control.Monad
-- import Control.Monad.Trans.State
import Data.ByteString (ByteString)
-- import qualified Data.ByteString.Unsafe as B
import qualified Data.ByteString.Char8 as C8
import Data.Bool
-- import Data.Bits
-- import Data.Char
-- import Data.List
import Data.Maybe

main :: IO ()
main = do
  [h, w] <- readInts
  xs <- replicateM h readStrings
  let line = replicate (w+2) '#'
  putStrLn line
  mapM_ putStrLn $ solve w $ concat xs 
  putStrLn line

solve :: Int -> [String] -> [String]
solve w = map wrap
  where
    wrap s = concat ["#", s, "#"]

-- utils
readInts :: IO [Int]
readInts = map (fst . fromJust . C8.readInt) . C8.words <$> C8.getLine

readStrings :: IO [String]
readStrings = map C8.unpack . C8.words <$> C8.getLine

-- readPair :: IO (Int, Int)
-- readPair = head . unfoldr readT <$> C8.getLine
--   where
--     readT = runStateT $
--       (,) <$> StateT (C8.readInt . C8.dropWhile isSpace)
--           <*> StateT (C8.readInt . B.unsafeTail)

-- readDate :: IO [Int]
-- readDate = map (fst . fromJust . C8.readInt) . concatMap (C8.split '/') . C8.words <$> C8.getLine

data Answer
  = YesNo Bool
  | YESNO Bool
  | AB Bool
  | Number Int
  | String String
  | ByteString ByteString
  | Compare Ordering
  | Compare2 Ordering

instance Show Answer where
  show (YesNo b)       = bool "No" "Yes"  b
  show (YESNO b)       = bool "NO" "YES"  b
  show (AB b)          = bool "B"  "A"    b
  show (Number i)      = show i
  show (String s)      = s
  show (ByteString bs) = C8.unpack bs
  show (Compare o)     = ordering "<" "=" ">" o
  show (Compare2 o)    = ordering "Right" "Balanced" "Left" o

ordering :: a -> a -> a -> Ordering -> a
ordering lt eq gt o = case o of
  LT -> lt
  EQ -> eq
  GT -> gt

-- | k 番目の文字に関数 f を適用する
indexMapBS :: Int -> (Char -> Char) -> ByteString -> ByteString
indexMapBS k f s = C8.concat [s1, C8.singleton (f c), s3]
  where
    (s1, s2) = C8.splitAt (k-1) s
    c = C8.head s2
    s3 = C8.tail s2