object Main extends App {
  val Array(h, w) = io.StdIn.readLine.split(" ").map(_.toInt)
  val ans = Array.fill(h+2)(Array.empty[Char].toBuffer)
  val line = Array.fill(w+2)('#')
  ans.head ++= line
  ans.tail.init.foreach(e => {
    e += '#'
    e ++= io.StdIn.readLine
    e += '#'
  })
  ans.last ++= line
  ans.foreach(a => println(a.mkString))
}