function main(s) {
	s = s.split("\n");
	t = s[0].split(" ").map(x => Number(x));
	console.log(Array(t[1]+3).join("#"));
	for (var i = 0; i < t[0]; i++) {
		console.log("#%s#", s[i+1]);
	}
	console.log(Array(t[1]+3).join("#"));
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
