#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
long long dp[100005];
;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool compare(pair<int, int> p1, pair<int, int> p2) {
  return p1.second > p2.second;
}
bool sortbyval(pair<string, int> a, pair<string, int> b) {
  return a.second < b.second;
}
int main() {
  long long h, w;
  cin >> h >> w;
  vector<string> v;
  for (int i = 0; i < h; i++) {
    string x;
    cin >> x;
    v.push_back(x);
  }
  int lens = h + w;
  for (int i = 0; i < lens; i++) cout << "#";
  cout << endl;
  for (int i = 0; i < h; i++) {
    cout << "#" << v[i] << "#" << endl;
  }
  for (int i = 0; i < lens; i++) cout << "#";
  return 0;
}
