object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val h, w = sc.nextInt()
  val a = Array.fill(h)(sc.next())
  println("#" * (w+2))
  a.map(s => s"#$s#").foreach(println)
  println("#" * (w+2))
}
