You are given a image with a height of H pixels and a width of W pixels.
Each pixel is represented by a lowercase English letter.
The pixel at the i-th row from the top and j-th column from the left is a_{ij}.
Put a box around this image and output the result. The box should consist of # and have a thickness of 1.

-----Constraints-----
 - 1 ≤ H, W ≤ 100
 - a_{ij} is a lowercase English letter.

-----Input-----
Input is given from Standard Input in the following format:
H W
a_{11} ... a_{1W}
:
a_{H1} ... a_{HW}

-----Output-----
Print the image surrounded by a box that consists of # and has a thickness of 1.

-----Sample Input-----
2 3
abc
arc

-----Sample Output-----
#####
#abc#
#arc#
#####


Difficulty: introductory

Starter code:

Solutions:
H, W = map(int, input().split())
s = '#' * (W + 2)
data = []
data.append(s)
for i in range(H):
    data.append('#' + str(input()) + '#')
data.append(s)
   
for i in range(H + 2):
    print(data[i])

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

#!/usr/bin/env python3


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
def main():
    H, W = list(map(int, input().split()))
    print(("#"*(W+2)))
    for _ in range(H):
        print(("#{}#".format(input())))
    print(("#"*(W+2)))

def test():
    import doctest
    doctest.testmod()

def __starting_point():
    #test()
    main()

__starting_point()

h, w = map(int, input().split())
for i in range(h+1):
  if i == 0 or i == h:
    print("#"*(w +2))
    if i == h:
      return
  print("#", end = "")
  print(input(), end = "")
  print("#")


h,w = map(int,input().split())
l=[]
[l.append(input()) for _ in range(h)]

print("#"*(w + 2))
for s in l:
    print("#",s,"#",sep='')

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

h, w = map(int, input().split())
print('#'*-~-~w)
for _ in [0]*h:
    print('#'+input()+'#')
print('#'*-~-~w)

h, w = list(map(int, input().split()))

print(('#' * (w+2)))
for i in range(h):
    data = list(map(str, input().split()))
    data2 = ['#'] + data + ['#']
    print((''.join(data2)))


print(('#' * (w + 2)))


h,w = map(int, input().split())
a = list(list(input().split()) for _ in range(h))
print("#"*(int(w)+2))
for i in range(h):
    print("#",*a[i],"#",sep="")
print("#"*(int(w)+2))

H, W = map(int, input().split())
print("#"*(W+2))
for i in range(H):
  a = input()
  print("#" + a + "#")
print("#"*(W+2))

h,w=map(int,input().split())
a=[list(input()) for i in range(h)]

d=[['#']*(w+2) for i in range(h+2)]
for i in range(h):
  for j in range(w):
    d[i+1][j+1]=a[i][j]
for i in range(h+2):
  print(*d[i],sep='')

H, W = map(int, input().split())
L = ['#' + input() + '#' for _ in range(H)]
L = ['#' * (W + 2)] + L + ['#' * (W + 2)]
[print(i) for i in L]

n,m=map(int,input().split())
print(*['#'*-~-~m]+['#'+input()+'#' for _ in range(n)]+['#'*-~-~m],sep='\n')

h, w = map(int, input().split())
print("#"*(w+2))
for i in range(h):
    a = str(input())
    a = "#" + a + "#"
    print(a)
print("#"*(w+2))

h, w = list(map(int, input().split()))
a = [input() for x in range(h)]
print(('#' * (w + 2)))
for s in a:
    print(('#' + s + '#'))
print(('#' * (w + 2)))


h, w = list(map(int, input().split()))
a = [input() for _ in range(h)]
ans = ['#'*(w+2)]
# print(ans)
for i in range(h):
    ans.append('#' + a[i] + '#')

ans.append('#'*(w+2))
for i in range(h+2):
    print((ans[i]))


H,W=list(map(int,input().split()))
a=[input() for _ in range(H)]
for i in range(0,H):
    a[i]='#'+a[i]+'#'

print(('#'*(W+2)))
for i in range(H):
    print((a[i]))
print(('#'*(W+2)))


# https://atcoder.jp/contests/abc152/tasks/abc152_c

h, w = list(map(int, input().split()))

row = '#' * (w + 2)

print(row)
for _ in range(h):
    print(('#' + input() + '#'))

print(row)


h,w = map(int,input().split())
s = []
s.append("#"*(w+2))
for i in range(h):
    t = input()
    t = "#" + t + "#"
    s.append(t)
s.append("#"*(w+2))
for ss in s:
    print("".join(ss))

h,w = map(int,input().split())
[print("#",end="") for j in range(w+2)]
print()
for i in range(h):
    print("#" + input() + "#")
[print("#",end="") for j in range(w+2)]

from typing import List


def answer(h: int, w: int, a: List[str]) -> List[str]:
    top_bottom_line = '#' * (w + 2)

    result = [top_bottom_line]
    for line in a:
        result.append(f'#{line}#')
    result.append(top_bottom_line)

    return result


def main():
    h, w = list(map(int, input().split()))
    a = [input() for _ in range(h)]
    for i in answer(h, w, a):
        print(i)


def __starting_point():
    main()

__starting_point()

h,w = map(int,input().split())
li = [list(input().split()) for i in range(h)]
#横河
for i in range(len(li)):
    st = li[i][0]
    li[i] = '#'+st+'#'
#上側
lis = '#'*(w+2)
li.append(lis)
li.insert(0,lis)
for i in li:
    print(i)

h, w = map(int, input().split())
a = [[]]
print("#"*(w+2))
for _ in range(h):
    print("#", input().strip(),"#",sep="")
print("#"*(w+2))


H, W = list(map(int, input().split()))
ans = []
for _ in range(H):
    a = input()
    ans.append("#" + a + "#")

print(("#" * (W + 2)))
for i in range(H):
    print((ans[i]))
print(("#" * (W + 2)))


h,w=map(int,input().split())
print('#'*(w+2))
for i in range(h):    
    print('#'+input()+'#')
print('#'*(w+2))

H, W = [int(x) for x in input().split()]
pic = [list(input()) for _ in range(H)]
ans = [['#' for i in range(W+2)] for j in range(H+2)]
for i in range(H):
  for j in range(W):
    ans[i+1][j+1] = pic[i][j]
low = ''
for i in range(H+2):
  for j in range(W+2):
    low += ans[i][j]
  print(low)
  low = ''

h, w = map(int, input().split())
p = [input() for _ in range(h)]

print('#' * (w + 2))
for s in p:
    print('#' + s + '#')
print('#' * (w + 2))

h, w = map(int,input().split())

print("#" * (w + 2))
for i in range(h):
    print("#" + input() + "#")
print("#" * (w + 2))

n,m=map(int,input().split())
print(*['#'*(m+2)]+['#'+input()+'#' for _ in range(n)]+['#'*(m+2)],sep='\n')

#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    strings=[]
    h,w = map(int,input().split())
    strings=[input().rstrip() for _ in range(h)]
    output=""

    for i in range(h+2):
        if i==0 or i==h+1:
            igeta="#"*(w+2)
            print("{}".format(igeta))
        else:
            output="#"+strings[i-1]+"#"
            print(output)

def __starting_point():
    main()
__starting_point()

h,w= map(int,input().split())
a = [input() for _ in range(h)]
s = ''
for i in range(w+2):
    s+='#'
print(s)
for i in a:
    t = list(i)
    t.insert(0,'#')
    t.append('#')
    print(''.join(t))
print(s)

H, W = [int(x) for x in input().split()]

for i in range(H):
    if i == 0:
        print((''.join(['#'] * (W + 2))))

    print(('#' + input() + '#'))

print((''.join(['#'] * (W + 2))))


h, w = list(map(int, input().split()))
pixel = [[] for i in range(h+2)]
for i in range(h+2):
    if i == 0:
        pixel[i].append('#'*(w+2))
    elif i == h+1:
        pixel[i].append('#'*(w+2))
    else :
        pixel[i].append('#')
        s = input()
        pixel[i].append(s)
        pixel[i].append('#')
for i in range(h+2):
    print(("".join(pixel[i])))



import sys

H, W = map(int, sys.stdin.readline().split())
print("#" * (W + 2))
for _ in range(H):
    s = sys.stdin.readline().strip()
    print("#" + s + "#")
print("#" * (W + 2))

h,w = map(int,input().split())
for i in range(w+1):
    print("#",end = "")
print("#")
for i in range(h):
    print("#"+input()+"#")
for i in range(w+1):
    print("#",end = "")
print("#")

h,w = map(int, input().split())
print("#" * (w + 2))
for i in range(h):
  s = input()
  print("#" + s + "#")
  
print("#" * (w + 2))

h,w=map(int,input().split())
huta=['#' for _ in range(w+2)]
huta=''.join(huta)
print(huta)
for _ in range(h):
    a=input()
    print('#{}#'.format(a))
print(huta)

h, w = list(map(int, input().split()))
a = [input() for i in range(h)]
print(("#" * (w + 2)))
for i in a:
    print(("#" + i + "#"))
print(("#" * (w + 2)))


H,W = map(int,input().split())
ls = [["#" for _ in range(W+2)]]

for _ in range(H):
  A = ["#"] + list(input()) + ["#"]
  ls.append(A)
  
ls.append(["#" for _ in range(W+2)])

for i in range(H+2):
  print("".join(ls[i]))

h,w=map(int,input().split())
 
print("#"*(w+2))
 
for i in range(h):
  num=input()
  print("#"+num+"#")
  
print("#"*(w+2))

def inpl(): return list(map(int, input().split()))
H, W = inpl()
ans = [["#"]*(W+2) for _ in range(H+2)]

for h in range(H):
    A = input()
    for w in range(W):
        ans[h+1][w+1] = A[w]

print(*["".join(a) for a in ans], sep="\n")

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

for i in range(H+2):
    if i == 0 or i == H+1:
        l = '#'*(W+2)
        res.append(l)
    else:
        a = input()
        a = '#' + a + '#'
        res.append(a)

for i in res:
    print(i)


h,w = map(int,input().split())
print("#"*(w+2))
for _ in range(h):
  print("#" + input() + "#")
print("#"*(w+2))

with open(0) as f:
    H, W, *a = f.read().split()
W = int(W)
a.insert(0,'#'*W)
a.append('#'*W)
for x in a:
    print(('#' + x.rstrip('\n') + '#'))


h, w = map(int, input().split())
print("#" * w + "#" * 2)
for _ in range(h):
    line = "#" + input() + "#"
    print(line)

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

h, w = map(int, input().split())
words = [0]*(h+2)
for i in range(1, h+1, 1):
    s = input()
    words[i] = s

for j in range(len(words)):
    if words[j] == 0:
        words[j] = '#'*(w+2)
    else:
        words[j] = '#'+words[j]+'#'

for ans in words:
    print(ans)

h, w = map(int, input().split())
print("#" * (w + 2))
for _ in range(h):
  print("#" + input() + "#")
print("#" * (w + 2))

#ABC062 B:PictureFrame

H,W = map(int, input().split())
pic = []
for _ in range(H):
    a = input()
    pic.append(a)
print('#'*(W+2))
for i in range(H):
    print('#' + pic[i] + '#')
print('#'*(W+2))

h, w = map(int, input().split())
grid = [["#"] * (w + 2) for _ in range(h + 2)]

for i in range(h):
    grid[i + 1] = ["#"] + list(map(str, input().rstrip())) + ["#"]

for i in range(h + 2):
    print("".join(grid[i]))

h,w = list(map(int, input().split()))
print('#' * (w + 2))
for _ in range(h):
    print('#' + input() + "#")
print('#' * (w + 2))

H,W=map(int,input().split())
anslist = [["#" for i in range(W+2)]for j in range(H+2)]
for i in range(H):
    a=input()
    for j in range(W):
        anslist[i+1][j+1]=a[j]
for i in range(H+2):
    for j in range(W+2):
        print(anslist[i][j],end="")
    print()

h, w = map(int,input().split())
a = [input() for _ in range(h)]
print("#"*(w+2))
for i in range(h):
    print("#" + a[i] + "#")
print("#"*(w+2))

HW = input().split()

H = int(HW[0])
W = int(HW[1])

lst = []

for i in range(H):
   lst.append('#' + input() + '#')

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

for s in lst:
   print(s)

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

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


frame = [['#' for _ in range(W+2)] for _ in range(H+2)]

mat = [['#' for _ in range(W)] for _ in range(H)]
for i in range(H):
    line = input()
    for j in range(W):
        mat[i][j] = line[j]

for i, row in enumerate(mat):
    for j, char in enumerate(row):
        frame[i+1][j+1] = char

for i in frame:
    for j in i:
        print(j, end="")
    print()


h,w=map(int, input().split())

print("#"*(w+2))
for i in range(h):
    print("#{}#".format(input()))
print("#"*(w+2))

h,w = map(int,input().split())

print('#'*(w+2))
for i in range (h):
    print('#' + input() + '#')
print('#'*(w+2))

H, W = map(int, input().split())
print("#"* (W + 2) )
for i in range(H):
  print("#" + input() + "#")
print("#"* (W + 2) )

h,w = list(map(int, input().split()))
print(("#"*(w+2)))
for i in range(h):
    s = input()
    print(("#" + s + "#"))
print(("#"*(w+2)))


H,W=map(int,input().split())
a=["" for i in range(H)]
for i in range(H):
    a[i]=list(str(input()))

for s in range(-1,H+1):
    for t in range(-1,W+1):           
        if s==-1 or s==H:
            print("#"*(W+2))
            break
        else:
            if t==-1:
                print("#",end="")
            elif t==W:
                print("#")
            else:
                print(a[s][t],end="")

h,w = map(int,input().split())
print("#"*(w+2))
for i in range(h):
  print("#"+input()+"#")
print("#"*(w+2))

a,b=map(int,input().split())
s=[]
for i in range(a):
    s.append(input())
print("#"*(b+2))
for i in range(a):
    print("#",end="")
    print(s[i],end="")
    print("#")
print("#"*(b+2))

N, W = list(map(int, input().split()))
l = [input() for _ in range(N)]

print(('#'*(W+2)))
for i in l:
    print(('#' + i + '#'))
print(('#'*(W+2)))


H,W = map(int, input().split())
H += 2
W += 2
for i in range(H):
	if i == 0 or i == H-1:
		out = '#'*W
	else:
		a = input()
		out = '#{}#'.format(a)
	print(out)

H, W = map(int, input().split())
print('#' * (W + 2) ) # head
for _ in range(H):
  print('#', input(), '#', sep='')

print('#' * (W + 2) ) # tail

h, w = map(int, input().split())
a_l = [ ['#'] + list(map(str, input().split())) + ['#'] for i in range(h) ]

print(''.join(['#']*(w+2)))
for a in a_l:
    print(''.join(a))
print(''.join(['#']*(w+2)))

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 = [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)

h, w = map(int, input().split())
a = ['#' * (w + 2)]
for i in range(h):
    a.append('#' + input() + '#')
a += ['#' * (w + 2)]

for i in range(h + 2):
    print(a[i])

import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10**9)
INF = float('inf')
MOD = 10**9 + 7
#MOD = 998244353


def si(): return input()
def ii(): return int(input())
def fi(): return float(input())
def lstr(): return input().split()
def lint(): return list(map(int, input().split()))
def lintdec(): return list(map(lambda x:int(x) - 1, input().split()))
def lnstr(n): return [input() for _ in range(n)]
def lnint(n): return [int(input()) for _ in range(n)]
def lint_list(n): return [lint() for _ in range(n)]



############################################################
H, W = lint()

ans = ['#' * (W + 2)]
for _ in range(H):
    ans.append('#' + input() + '#')
ans.append('#' * (W + 2))

print('\n'.join(ans))

h, w = list(map(int, input().split()))
print(('#'*(w + 2)))
for _ in range(h):
  print(('#' + input() + '#'))
print(('#'*(w + 2)))


with open(0) as f:
    H, W, *a = f.read().split()
W = int(W)
a.insert(0,'#'*W)
a.append('#'*W)
for x in a:
    print(('#' + x.rstrip('\n') + '#'))


h,w=map(int, input().split())
print("#"*(w+2))

for i in range(h):
    s=input()
    print("#"+s+"#")

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

def main():
    h,w= list(map(int, input().split()))
    a = []
    for i in range(h):
        a.append(input())
    cnt = len(a[0])+2
    print(("#" * cnt))
    for _ in a:
        print(f'#{_}#')
    print(("#" * cnt))


def __starting_point():
    main()

__starting_point()

h,w=map(int,input().split())

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

for i in range(h):
  num=input()
  print("#"+num+"#")
  
print("#"*(w+2))

h,w=map(int,input().split())
s=[""]*h
for i in range(h) :
  s[i]=input()
print("#"*(w+2))
for i in range(h) :
  print("#"+s[i]+"#")
print("#"*(w+2))

h,w = map(int,input().split())
a = []
for _ in range(h):a.append(input())
for _ in range(w + 2):print("#",end="")
print()
for i in range(h):
    print("#",end="")
    print(a[i],end="")
    print("#")
for _ in range(w + 2):print("#",end="")

H,W = map(int,input().split())
A = [input() for i in range(H)]
print('#'*(W+2))
for a in A:
    print('#' + a + '#')
print('#'*(W+2))

import sys
import copy
import math
import itertools
import numpy as np
l = [int(c) for c in input().split()]
H = l[0]
W = l[1]
a = [input() for c in range(H)]


print("#"*(W+2))
for i in range(H):
    print("#"+a[i]+"#")
print("#"*(W+2))

h,w = map(int,input().split())
a = ["#"*(w+2)]
for i in range(h):
    a.append('#'+input()+"#")
a.append("#"*(w+2))
for i in range(h+2):
    print(a[i])

H, W=map(int, input().split())
out=['#'*(W+2)]+['#'+input()+'#' for _ in range(H)]+['#'*(W+2)]
print(*out, sep='\n')


x,y=input().split()
x=int(x)
y=int(y)
a=[input() for i in range(x)]
c=""
for i in range(y+2):
  c=c+"#"
print(c)
for i in range(x):
  print("#"+a[i]+"#")
print(c)

h,w=list(map(int,input().split()))
top = "#"
top *=(w + 2)
print(top)
for i in range(h):
  tmp = input()
  print(("#"+tmp+"#"))
print(top)


H, W = map(int, input().split())
A = [input() for _ in range(H)]

W += 2
f = '#'
print(f * W)
for a in A:
    print(f'#{a}#')
print(f * W)

h, w = map(int, input().split())
a = []
for _ in range(h):
    a.append('#' + input() + '#')
sharp = '#' * (w + 2)
print(sharp)
for j in range(0, h):
    print(a[j])
print(sharp)

h,w = map(int,input().split())

print('#'*(w+2))
for i in range(h):
    s = input()
    print('#'+s+'#')
print('#'*(w+2))

h, w = map(int, input().split())

s = "#" * (w+2)

print(s)
for i in range(h):
    t = input()
    print("#", end="")
    print(t, end="#\n")
print(s)


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

scr_list = [input() for _ in range(H)]

print('#' * (W+2))
for i in scr_list:
    print('#' + i + '#')
print('#' * (W+2))

# coding: utf-8

height, width = map(int, input().split())

for i in range(width+2):
    print("#", end='')
    
print("")

for j in range(height):
    print("#", end='')
    str = input()
    print(str, end='')
    print("#")


for l in range(width+2):
    print("#", end='')

def resolve():
    '''
    code here
    '''
    H, W = [int(item) for item in input().split()]
    grid = [input() for _ in range(H)]
    
    print(('#'*(W+2)))
    for line in grid:
        print(('#' + line + '#'))
    print(('#'*(W+2)))

def __starting_point():
    resolve()

__starting_point()

h, w = map(int, input().split())
a = []
for _ in range(h):
    a.append(input())
print('#' * (w + 2))
for i in range(h):
    print('#' + a[i] + '#')
print('#' * (w + 2))

h, w = map(int, input().split())
print("#"*(w+2))
for i in range(h):
    s=input()
    print("#" + s + "#")
print("#"*(w+2))

H, W = list(map(int, input().split()))
A = [list(input()) for _ in range(H)]

# 一段目
print(("#"*(W+2)))
for a in A:
    print(("#" + "".join(a) + "#"))
# 最終段
print(("#"*(W+2)))


h,w = [int(x) for x in input().split()]
print("#" * (w + 2))
for i in range(h):
  print("#" + input() + "#")
print("#" * (w + 2))

with open(0) as f:
    H, W, *a = f.read().split()
W = int(W)
a.insert(0,'#'*W)
a.append('#'*W)
for x in a:
    print(('#' + x.rstrip('\n') + '#'))


h,w = map(int, input().split())
al = []
for _ in range(h):
    row = input()
    row = '#' + row + '#'
    al.append(row)

top = '#'*(w+2)
print(top)
for a in al:
    print(a)
print(top)

H,W = list(map(int,input().split()))
a = ''
for i in range(W + 2):
  a += '#'
L = []
L.append(a)
for j in range(H):
  b = str(input())
  c = '#' + b + '#'
  L.append(c)
L.append(a)
for k in range(H + 2):
  print((L[k]))


h, w = map(int, input().split())

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

for i in range(h):
  s = input()
  print("#" + s + "#")

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

h,w = map(int, input().split())
print("#"*(w+2))
for i in range(h):
  s = input()
  print("#"+s+"#")
print("#"*(w+2))

h,w = map(int, input().split())
a = [input() for i in range(h)]

print("#"*(w+2))
for i in range(h):
    print("#" + a[i] + "#")
print("#"*(w+2))

x,y = map(int,input().split())
L = [list(input()) for _ in range(x)]
F = [['#']*(y+2) for _ in range(x+2)]
for i in range(x):
  for j in range(y):
    F[i+1][j+1] = L[i][j]
for f in F:
  print(''.join(f))