open System

let [| N; M |] = stdin.ReadLine().Split(' ') |> Array.map int
let (S : String[]) = Array.zeroCreate (N + 2)
S.[0] <- new String('#', M + 2)
for i in 0..(N-1) do
  S.[i + 1] <- "#" + stdin.ReadLine() + "#"
S.[N+1] <- new String('#', M + 2)

for i in {0..(N+1)} do
  printfn "%s" S.[i]
