fun main(args: Array<String>) {
    val (h, w) = readLine()!!.split(' ').map(String::toInt)
    val rows = (1..h).map { '#' + readLine()!! + '#' }
    val headerFooter = CharArray(w + 2) { '#' }.joinToString("")
    println(headerFooter)
    rows.forEach(::println)
    println(headerFooter)
}
