_,w,*s=open(0).read().split();t=['#'*(int(w)+2)];a=t+['#'+t+'#'for t in s]+t;print(*a,sep='\n')

_,w,*s=open(0).read().split();t=['#'*(int(w)+2)];a=t+['#'+t+'#'for t in s]+t;print((*a))
_, w, *s = open(0).read().split()
t = ["#" * (int(w) + 2)]
a = t + ["#" + t + "#" for t in s] + t
print(*a, sep="\n")

_, w, *s = open(0).read().split()
t = ["#" * (int(w) + 2)]
a = t + ["#" + t + "#" for t in s] + t
print((*a))

-print(*a, sep="\n") +print((*a))