object Main extends App{
import scala.io.StdIn._
val Array(h,w) = readLine.split("\\s").map(_.toInt)

var a:Seq[String] = Seq()

for (i<- 1 to h){
  a = a :+ ("#" + readLine() + "#")
}

a = ("#" *(w+2)) +: a :+ ("#" *(w+2))

a.foreach {println}
}