import scala.io.StdIn

object Main extends App {
  val Array(h, w) = StdIn.readLine().split(" ").map(_.toInt)
  var strArr = new Array[String](h)
  for(r <- 0 to h - 1) strArr(r) = StdIn.readLine()

  println(Array.fill(w+2)("#").mkString)
  strArr.foreach(str => println(s"#$str#"))
  println(Array.fill(w+2)("#").mkString)

}