import io.StdIn.readLine

object Main extends App {
  val Array(h, w) = readLine.split(" ").map(_.toInt)
  val pict = Seq.fill(h)(readLine).map("#" ++ _ ++ "#")

  println(("#" * (w + 2) +: pict :+ "#" * (w + 2)).mkString("\n"))
}
