void main() {
    int[] tmp = readln.split.to!(int[]);
    int h = tmp[0], w = tmp[1];
    string[] a = new string[h];
    foreach (i; 0 .. h) {
        a[i] = readln.chomp;
    }
    string row = '#'.repeat(w+2).to!string;
    row.writeln;
    foreach (x; a) {
        writeln('#', x, '#');
    }
    row.writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;