
object MainKt {
  @JvmStatic fun main(args:Array<String>) {
    val (H,W) = readLine()!!.split(" ").map(String::toInt)
    val pixel=Array(H) {
      readLine()!!
    }
      (1..(W+2)).map {"#"}.forEach(::print).let { println("")}
      (1..H).map{"#"+pixel[it-1]+"#"}.forEach(::println)
      (1..(W+2)).map {"#"}.forEach(::print).let { println("")}
  }

}