#include<bits/stdc++.h>
using namespace std;


int main(){
    int x, y;
    cin >> x >> y;

    string top(y + 2, '#');

    cout << top <<endl;

    while (x--) {
        string str;
        cin >> str;
        cout << "#" << str << "#" << endl;
    }

    cout << top <<endl;
    return 0;
}
