
object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val h, w = sc.nextInt()
  val a = Array.fill(h)(sc.next().toList)
  
  println("#" * (w+2))
  for (i <- a){
    print("#")
    for (j <- i) {
      print(j)
    }
    println("#")
  }
  println("#" * (w+2))
}