"use strict";

const main = arg => {
    const H = parseInt(arg.split("\n")[0].split(" ")[0]);
    const W = parseInt(arg.split("\n")[0].split(" ")[1]);
    const pixel = arg.split("\n").slice(1, H + 1);
    
    let answer = [];
    
    answer[0] = [];
    answer[0].push("#".repeat(W + 2));
    
    for(let i=1; i<=H; i++) {
        answer[i] = [];
        answer[i].push("#" + pixel[i - 1] + "#");
    }

    answer[H + 1] = [];
    answer[H + 1].push("#".repeat(W + 2));
    
    console.log(answer.join("\n"));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
