import std.algorithm,
       std.string,
       std.array,
       std.range,
       std.stdio,
       std.conv;

void main() {
  int[] HW = readln.chomp.split.to!(int[]);
  int H = HW[0],
      W = HW[1];
  string[] text = H.iota.map!(_ => readln.chomp).array;

  (W+2).iota.each!(_ => write("#")); writeln;

  foreach (line; text) {
    writefln("#%s#", line);
  }

  (W+2).iota.each!(_ => write("#")); writeln;
}
