
import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val h, w = sc.nextInt()

  val st = Stream.range(0, h)
    .map(_ => "#" + sc.next + "#")

  val wall = Seq.fill(w + 2)('#').mkString

  Stream.concat(Stream(wall), st, Stream(wall))
    .foreach(println)
}
