fun main(args: Array<String>) {
    val (h,w)= readLine()!!.split(" ").map { it.toInt() }
    val a = (1..h).map { readLine()!! }

    val sb = StringBuilder()
    sb.append("#".repeat(w+2)).append("\n")
    a.forEach { sb.append("#").append(it).append("#\n") }
    sb.append("#".repeat(w+2)).append("\n")

    println(sb)
}