H, W = list(map(int,input().split()))

A = [eval(input()) for _ in range(H)]



result = []

for a in A:

  result.append('#' + a +'#')

waku = '#' * (W+2)

result.insert(0,waku)

result.insert(len(A)+1,waku)

for r in result:

  print(r)



"""

お前の目は節穴か？

"""
H, W = list(map(int,input().split()))

A = ['#' + eval(input()) + '#' for _ in range(H)]

result = []

result.append('#' * (W+2))

for a in A:

  result.append(a)

result.append('#' * (W+2))

for r in result:

  print(r)
H, W = list(map(int, input().split()))
A = [eval(input()) for _ in range(H)]
result = []
for a in A:
    result.append("#" + a + "#")
waku = "#" * (W + 2)
result.insert(0, waku)
result.insert(len(A) + 1, waku)
for r in result:
    print(r)
"""
お前の目は節穴か？
"""

H, W = list(map(int, input().split()))
A = ["#" + eval(input()) + "#" for _ in range(H)]
result = []
result.append("#" * (W + 2))
for a in A:
    result.append(a)
result.append("#" * (W + 2))
for r in result:
    print(r)

-A = [eval(input()) for _ in range(H)] +A = ["#" + eval(input()) + "#" for _ in range(H)] +result.append("#" * (W + 2)) -    result.append("#" + a + "#") -waku = "#" * (W + 2) -result.insert(0, waku) -result.insert(len(A) + 1, waku) +    result.append(a) +result.append("#" * (W + 2)) -""" -お前の目は節穴か？ -"""