from collections import Counter,defaultdict,deque

from heapq import heappop,heappush,heapify

import sys,bisect,math,itertools

sys.setrecursionlimit(10**8)

mod = 10**9+7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))



h,w = inpl()

s = [eval(input()) for i in range(h)]

res = [''] * (h+2)

for i in range(h+2):

    if i == 0 or i == h+1:

        res[i] = '#' * (w+2)

        continue

    res[i] = '#' + s[i-1] + '#'

for i in res:

    print(i)
from collections import Counter,defaultdict,deque

from heapq import heappop,heappush

from bisect import bisect_left,bisect_right 

import sys,math,itertools,fractions

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))



h,w = inpl()

s = [eval(input()) for _ in range(h)]

res = []

for i in range(h+2):

    if i == 0 or i == h+1:

        res.append('#' * (w+2))

    else:

        res.append('#' + s[i-1] + '#')

for x in res:

    print(x)
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
import sys, bisect, math, itertools

sys.setrecursionlimit(10**8)
mod = 10**9 + 7


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


def inpln(n):
    return list(int(sys.stdin.readline()) for i in range(n))


h, w = inpl()
s = [eval(input()) for i in range(h)]
res = [""] * (h + 2)
for i in range(h + 2):
    if i == 0 or i == h + 1:
        res[i] = "#" * (w + 2)
        continue
    res[i] = "#" + s[i - 1] + "#"
for i in res:
    print(i)

from collections import Counter, defaultdict, deque
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
import sys, math, itertools, fractions

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


h, w = inpl()
s = [eval(input()) for _ in range(h)]
res = []
for i in range(h + 2):
    if i == 0 or i == h + 1:
        res.append("#" * (w + 2))
    else:
        res.append("#" + s[i - 1] + "#")
for x in res:
    print(x)

-from heapq import heappop, heappush, heapify -import sys, bisect, math, itertools +from heapq import heappop, heappush +from bisect import bisect_left, bisect_right +import sys, math, itertools, fractions +INF = float("inf") -def inpln(n): -    return list(int(sys.stdin.readline()) for i in range(n)) - - -s = [eval(input()) for i in range(h)] -res = [""] * (h + 2) +s = [eval(input()) for _ in range(h)] +res = [] -        res[i] = "#" * (w + 2) -        continue -    res[i] = "#" + s[i - 1] + "#" -for i in res: -    print(i) +        res.append("#" * (w + 2)) +    else: +        res.append("#" + s[i - 1] + "#") +for x in res: +    print(x)