(defn input []
  (let [[H W] (->> (clojure.string/split (read-line) #"\s")
                (map #(Integer/parseInt %)))]
    (list W (->> (repeatedly H read-line)))))

(defn PictureFrame [[W As]]
  (let [hbar (str (apply str (repeat (+ 2 W) \#))"\n")]
    (str hbar
      (apply str (map #(str "#" % "#\n") As))
      hbar)))

(-> (input)
  PictureFrame
  println)