import java.util.*

val sc = Scanner(System.`in`)
val H = sc.nextInt()
val W = sc.nextInt()

fun main(args: Array<String>) {
    val a = Array(H) { "" }
    for (i in 1..H) {
        a[i - 1] = sc.next()
    }
    for (i in 0..H + 1) {
        print("#")
        if (i in 1..H) {
            print(a[i - 1])
        } else {
            print("#".repeat(W))
        }
        println("#")
    }
}
