#include <stdio.h>
#include <string.h>

int pri(int x);

int main()
{
	int h, w, i;
	char str[100][100];
	while (1) {
		scanf("%d %d", &h, &w);
		
		for (i=0;i<h;i++) {
			scanf("%s", str[i]);
		}
		pri(w);
		for (i=0;i<h;i++) {
			printf("#%s#\n", str[i]);
		}
		pri(w);
		printf("\n");
	}
	return 0;
}

int pri(int x)
{
	int j;
	for (j=0;j<x+2;j++)
		printf("#");
	printf("\n");
	return 0;
}
 