#include<bits/stdc++.h>
using namespace std;
int main()
{

string s,ss;
int a,b,i,j,l;
vector<string>v;
cin>>a>>b;
for(i=1;i<=a;i++)
{
cin>>s;v.push_back(s);
}
for(i=0;i<=b+1;i++)cout<<"#";
cout<<endl;
for(i=0;i<a;i++)cout<<"#"<<v[i]<<"#\n";
for(i=0;i<=b+1;i++)cout<<"#";
cout<<endl;
}