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