'use strict';

const input = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
const numbers = input[0].split(' ').map(n => parseInt(n, 10));

const h = numbers[0];
const w = numbers[1];

console.log('#'.repeat(w + 2));

for (let i = 1; i < h + 1; i++) {
  const line = input[i];
  console.log('#' + line + '#');
}

console.log('#'.repeat(w + 2));