h, w = (int(i) for i in input().split())

a = [input() for i in range(h)]

for i in range(h+2):

    for j in range(w+2):

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

            print("#",end="")

        else:

            print(a[i-1][j-1],end="")

    print()

def main():

    H, W = (int(i) for i in input().split())

    A = ["#"+input()+"#" for i in range(H)]

    print("#"*(W+2))

    print(*A, sep="\n")

    print("#"*(W+2))





if __name__ == '__main__':

    main()

h, w = (int(i) for i in input().split())
a = [input() for i in range(h)]
for i in range(h + 2):
    for j in range(w + 2):
        if i == 0 or i == h + 1 or j == 0 or j == w + 1:
            print("#", end="")
        else:
            print(a[i - 1][j - 1], end="")
    print()

def main():
    H, W = (int(i) for i in input().split())
    A = ["#" + input() + "#" for i in range(H)]
    print("#" * (W + 2))
    print(*A, sep="\n")
    print("#" * (W + 2))


if __name__ == "__main__":
    main()

-h, w = (int(i) for i in input().split()) -a = [input() for i in range(h)] -for i in range(h + 2): -    for j in range(w + 2): -        if i == 0 or i == h + 1 or j == 0 or j == w + 1: -            print("#", end="") -        else: -            print(a[i - 1][j - 1], end="") -    print() +def main(): +    H, W = (int(i) for i in input().split()) +    A = ["#" + input() + "#" for i in range(H)] +    print("#" * (W + 2)) +    print(*A, sep="\n") +    print("#" * (W + 2)) + + +if __name__ == "__main__": +    main()