Problem:
 Score : 200 points    Problem Statement 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 1 2 3
abc
arc      Sample Output 1 #####
#abc#
#arc#
#####       Sample Input 2 1 1
z      Sample Output 2 ###
#z#
###

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt
from functools import lru_cache, reduce
INF = 1 << 60
mod = 1000000007
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


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

Solution (Python):
H,W = list(map(int,input().split()))
a = []
for i in range(H):
    a.append(list(map(str,input().split())))
s = ['
print(''.join(s))
for i in range(H):
    print('
print(''.join(s))

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

grid = [['
for i in range(H + 2):
    for j in range(W + 2):
        if 1 <= i <= H and 1 <= j <= W:
            grid[i][j] = A[i - 1][j - 1]

for i in range(H + 2):
    print(*grid[i], sep='')

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
h,w=iim()
p = []
for i in range(h):
    p.append(input())

print('
for i in p:
    print('
print('

Solution (Python):
h, w = map(int, input().split())
print('
for i in range(h):
    print('
print('

Solution (Python):
h, w = map(int, input().split())
s = [input() for i in range(h)]

mark = '
print(mark * (w+2))
for string in s:
    print('
print(mark * (w+2))

Solution (Python):
h,w=[int(i) for i in input().split()]
a=[]

for i in range(h):
    a.append(input())
    
print("
for i in a:
    print("


print("

Solution (Python):
h,w=map(int,input().split())
print('
for i in range(h):
    print('
print('

Solution (Python):
h,w=map(int, input().split())
a=list()
for _ in range(h):
    a.append(str(input()))

for i in range(len(a)):
    a[i]='
a.insert(0, '
a.append('

for s in a:
    print(s)

Solution (Python):
import math
h, w = list(map(int, input().split()))
o = ''
f = w + 2
o = o + (f*'
for i in range(h):
    v = input()
    vl = len(v)
    a = math.floor((f - vl) / 2)
    o = o + ((a*'
o = o + (f*'
print(o)

Solution (Python):
h,w=map(int,input().split())
print("
for i in range(h):
    print("
print("

Solution (Python):
_,w,*s=open(0).read().split()
t,k="
print(t,*s,sep=k,end=k+t)

Solution (Python):
_, w, *s = open(0).read().split()
t, k = "
print(t, *s, sep=k, end=k+t)

Solution (Python):
H, W = map(int, input().split())

matrix = [["

for i in range(1, H+1):
    row = list(input())
    for j in range(1, W+1):
        matrix[i][j] = row[j-1]

for row in matrix:
    print("".join(row))

Solution (Python):
h, w = map(int, input().split())
a = [input() for i in range(h)]
print("
for i in range(h):
     print("
print("

Solution (Python):
h,w=map(int,input().split())
tmp=["
print("".join(tmp))
for i in range(h):
    tmp2=["
    a=list(input())
    tmp2+=a
    tmp2.append("
    print("".join(tmp2))
print("".join(tmp))

Solution (Python):
n,m=map(int,input().split())
print("
for i in range(n):
  print("
print("

Solution (Python):
h, w = map(int, input().split())
x = '
y = x*(w+2)

a = list(x+input()+x for _ in range(h))
a.insert(0,y)
a.append(y)
print('\n'.join(a))

Solution (Python):
H, W = [int(i) for i in input().split()]

a = []

for i in range(H):
    a.append([str(input())])

ans = []

for i in range(H+2):
    if (i ==0) | (i==H+1):
        add_st = '
    else:
        add_st = '
        
        
    ans.append(add_st)

for i in range(H+2):
    print(ans[i])

Solution (Python):


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

ans = []

for i in range(H):
    ans_ = input()
    ans.append(ans_)

ans_t_ = '
print(ans_t_)

for t in ans:
    ans_t = '
    print(ans_t)

print(ans_t_)

Solution (Python):
h, w = map(int, input().split())
print('
for i in range(h):
	s = input()
	print('
print('

Solution (Python):
H, W = map(int, input().split())
a=[]
for _ in range(H):
    a.append(input())
print('
for i in range(H):
    print('
print('

Solution (Python):
h, w = [int(_) for _ in input().split()]
print('
for i in range(h):
  print('
print('

Solution (Python):
H, W = map(int, input().split())
print("
for _ in range(H):
    print("
print("

Solution (Python):
h,w = map(int,input().split())
a = [input() for _ in range(h)]
print('
for i in a:
    print('
print('

Solution (Python):
h,w = map(int,input().split())
sharp = ""
for i in range(w + 2):
  sharp += "
print(sharp)
for i in range(h):
  text = input()
  text += "
  text = "
  print(text)
print(sharp)

Solution (Python):
h, w = (int(x) for x in input().split())
ab=[]
ab.append(['
for _ in range(h):
    s=input()
    s=list(s)
    s =['
    ab.append(s)
ab.append(['

for i in range(h+2):
    k=ab[i]
    print(''.join(map(str,k)))

Solution (Python):
H, W = map(int, input().split())
a = [[x for x in input()] for _ in range(H)]

ans = []
ans.append(['
for row in a:
    row.insert(0, '
    row.append('
    ans.append(row)
ans.append(['
for i in range(H+2):
    print(*ans[i], sep='')

Solution (Python):
h,w=map(int,input().split())
a= [list(input().split()) for _ in range(h)]
print('
for i in range(h):
    print('
print('

Solution (Python):
h,w=list(map(int,input().split()))
print('
a=[]
for i in range(h):
    a='
    a+=input()
    a+='
    print(a)
print('

Solution (Python):


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

answer = ['
for _ in range(H):
    answer.append('
answer.append('

print(*answer,sep='\n')

Solution (Python):
h, w = [int(i) for i in input().split()]

tmp = ["

print("

for i in tmp:
    print(i)

print("

Solution (Python):
h,w=map(int,input().split())

print("

for i in range(h):
    a=input()
    print("

print("

Solution (Python):
H,W=map(int,input().split())
print("
for i in range(H):
  a=input()
  print("
print("

Solution (Python):
h, w = map(int, input().split())
s = ["
a = [s + list(input()) + s for _ in range(h)]
s = ["
print("".join(s))
for b in a:
    print("".join(b))
print("".join(s))

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

Solution (Python):
h, w = map(int, input().split())
f = [input() for z in range(h)]

for i in range(h+2):
    if i == 0 or i == h+1:
        print('
    else:
        print('

Solution (Python):
h,w=map(int,input().split())
print("
for _ in range(h):
  a=input()
  print("
  
print("

Solution (Python):
H,W = map(int,input().split())
print("
for _ in range(H):
    a = input()
    print("
print("

Solution (Python):
H, W = map(int, input().split())
list = []

for i in range(H):
  line = input()
  list.append(line)
  
print('

for i in range(H):
  print('

print('

Solution (Python):
h,w=map(int,input().split())
a=["

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

Solution (Python):
h, w = map(int, input().split())
a = [input() for _ in range(h)]
print("
for i in range(h):
    print("
print("

Solution (Python):
H, W = [int(i) for i in input().split()]
strings = [input() for i in range(H)]
strings.insert(0, '')
strings.append('')

grid = []
for i in range(H + 2):
        grid.append(strings[i].center(W+2,'

for row in grid:
    print(row)

Solution (Python):
h,w=map(int,input().split())
a=[input() for _ in range(h)]
print('
for i in range(h):
    print('
print('

Solution (Python):
H, W = map(int, input().split())

print("".join(["
for h in range(H):
  print("".join( ["
print("".join(["

Solution (Python):
H,W = map(int,input().split())
print('
for i in range(H):
    a = input()
    print('
print('

Solution (Python):

H,W = map(int, input().split())
print('
for i in range(H):
    a = input()
    print('
print('

Solution (Python):
h,w=map(int,input().split())
print('
for i in range(h):
	print('
print('

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

h, w = na()
a = nsn(h)

for i in range(w + 2):
    print("
print()

for i in range(h):
    print("
    for j in range(w):
        print(a[i][j], end="")
    print("

for i in range(w + 2):
    print("
print()

Solution (Python):
h, w = map(int, input().split())
T = [input() for i in range(h)]

for i in range(h + 2):
    if i == 0 or i == h + 1:
        print("
    else:
        print("

Solution (Python):
h,w=map(int,input().split())
ans=[['' for i in range(w+2)] for j in range(h+2)]
ans[0] = ['
ans[-1] = ['
for i in range(h):
  ans[i+1][1:w+1] = list(input())
  ans[i+1][0] = '
  ans[i+1][-1] = '
for i in range(h+2):
  print(*ans[i],sep='')

Solution (Python):
H, W = map(int, input().split())
A = [ input() for i in range(H) ]
print('
for i in range(H): print('
print('

Solution (Python):
h,w = map(int,input().split())
print("
for _ in range(h):
  print("
print("

Solution (Python):

h, w = map(int, input().split())
a = []
for _ in range(h):
    a.append('
    
from collections import deque
a = deque(a)
a.appendleft('
a.append('

for i in a:
    print(''.join(i))

Solution (Python):
h,w=map(int,input().split())
pic=[input() for _ in range(h)]
print('
for i in pic:
    print('
print('

Solution (Python):
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd



import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def main():
    h,w = map(int,input().strip().split())
    ll=["
    
    for _ in range(h):
        ll.append("
    ll.append("
    for s in ll:
        print(s)


if __name__ == '__main__':
    main()

Solution (Python):
h,w = map(int,input().split())
a = [input() for i in range(h)]
print("
for s in a:
  print("
print("

Solution (Python):
h,w = [int(x) for x in input().split()]
a = []
for _ in range(h):
    a.append(input())

print("
for x in a:
    print("
print("

Solution (Python):
h, w = map(int, input().split())
L = []
for h in range(h):
    L.append(input())
for i in range(w+2):
    print("
print()
for j in range(h+1):
    print("
    print(L[j], end="")
    print("
for k in range(w+2):
    print("

Solution (Python):
h,w = map(int,input().split())
ans = []
for i in range(h):
    
    s = list(input())
    tmp = ["
    ans.append(tmp)

aaa = [["
aaa.extend(ans)
aaa.append(["

for i in aaa:
    print("".join(i))

Solution (Python):
h,w=list(map(int,input().split()))
a=[]
for i in range(h):
    a1=list(input())
    a.append(a1)
print('
for i in range(h):
    print('
    for j in range(w):
        print(a[i][j],end="")
    print('
    print("")
print('

Solution (Python):
H,W=map(int,input().split())
S=[["

for i in range(1,H+1):
    S[i][1:-1]=list(input())
    
for s in S:
    s = map(str, s)
    print("".join(s))

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

print("
for a in A:
    print("
    print(a, end="")
    print("
print("

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

for i in range(h):
    print("

print(st)

Solution (Python):
h,w=map(int,input().split())
print('
for _ in [0]*h:
  print('
print('

Solution (Python):








def resolve():
    H,W=map(int,input().split())
    A=[str(input()) for i in range(H)]

    for i in range(H+2):
        if i ==0 or i==H+1:
            print(''.join(['
        else:
            print('

resolve()

Solution (Python):











mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def main():
    h,w = map(int,input().split())
    a = []
    a.append(['
    for i in range(h):
        x = list(input())
        x.insert(0,'
        x.append('
        a.append(x)
    a.append(['
    for i in range(len(a)):
        print(''.join(a[i]))
    return

if __name__=='__main__':
    main()

Solution (Python):
h,w = [int(i) for i in input().split()]
p = []
for i in range(h):
  p.append(input())
for i in range(h):
  p[i] = '
p.insert(0,'
p.append('
for i in range(h+2):
  print(p[i])

Solution (Python):
H,W=map(int,input().split())
L=[]
for i in range (H):
	T=input()
	L.append(T)
A="
for i in range (H+2):
	if i==0 or i==H+1:
		print(A)
	else:
		print("
		print(L[i-1],end="")
		print("

Solution (Python):
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7


H, W = MI()
print('
for _ in range(H):
    print('
print('

Solution (Python):
h,w=map(int,input().split())
print("
for i in range(h):
    print("
print("

Solution (Python):
h, w = map(int, input().split())
a = [list(input()) for _ in range(h)]
for i in range(h):
    a[i].insert(0,'
    a[i].append('
wall = ['
a.insert(0, wall)
a.append(wall)
for i in a:
    print(*i, sep='')

Solution (Python):



def main():
    H, W = [int(x) for x in input().split()]
    print("
    for _ in range(H):
        print("
    print("
    pass


if __name__ == '__main__':
    main()

Solution (Python):
h,w=map(int,input().split())
print("
for _ in range(h):
  print("
print("

Solution (Python):
n,m=map(int,input().split())
a_all=[]
for i in range(n):
            a=list(input())
            a_all.append(a)

for i in range(n+2):
            if i==0 or i==n+1:
                        c=['
                        d="".join(c)
                        print(d)        
            else:
                        
                        e=['
                        f="".join(e)
                        print(f)

Solution (Python):
H,W = map(int,input().split())
pic = [["
for i in range(H):
    a = input()
    for j in range(W):
        pic[i+1][j+1] = a[j]

for i in range(H+2):
    for j in range(W+2):
        print(pic[i][j],end = '')
    print('')

Solution (Python):
H,W=map(int,input().split())
list=[]
for z in range(H):
    a=input()
    list.append(a)
print('
for y in range(H):
    print('
print('

Solution (Python):
h,w=map(int,input().split())
a=[]
for i in range(h):
  s=input()
  a.append(s)

H=""
for j in range(w+2):
  H+="

for i in range(h+2):
  r=""
  if i==0 or i==h+1:
    print(H)
  else:
    r+="
    r+=a[i-1]
    r+="
    print(r)

Solution (Python):
H,W=map(int,input().split())
a=[input() for _ in range(H)]
print("
for row in a:
    print("
print("

Solution (Python):
h, w = map(int, input().split())



print("

for i in range(h):
  print("

print("

Solution (Python):
h, w = map(int, input().split())
print("
for i in range(h):
    a = input()
    print("
print("

Solution (Python):


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    H,W=MI()
    a=[[] for _ in range(H+2)]
    a[0]="
    for i in range(H):
        a[i+1]="
        
    a[-1]="
    
    for i in range(H+2):
        print(a[i])

main()

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

Solution (Python):

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


for i in range(w+1):
    print('
print('

for i in range(h):
    print('
    for j in range(w):
        print(a[i][j], end = '')
    print('

for i in range(w+1):
    print('
print('

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

print('
for a in A:
    print('
print('

Solution (Python):


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


b_list=[ ["

for i in range(H):
    for j in range(W):
        b_list[i+1][j+1] = a_list[i][j]

for li in b_list:
    print(*li,sep="")

Solution (Python):


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


for i in range(H+2):
    if i==0 or i==(H+1):
        print( "
    else:
        print("

Solution (Python):
h,w = map(int, input().split())
a = [input().split() for _ in range(h)]
print('
for i in a:
    print('
print('

Solution (Python):
h,w=map(int,input().split())
ans="
ans+="\n"
for i in range(h):
    s="
    s+=input()
    s+="
    ans+=s
ans+="
print(ans)

Solution (Python):
h, w = map(int, input().split())
l = [input() for _ in range(h)]
s = "
print(s)
for i in range(h):
    m = "
    for j in range(w):
        m += str(l[i])[j]
    m += "
    print(m)
print(s)

Solution (Python):
h,w = map(int,input().split())

a= [list(input()) for _ in range(h)]

x=[]


first =[]
for i in range(w+2):
  first.append("
  


for i in range(h):
  a[i].append("
  
  for j in range(w):
    a[i].append(a[i][j])
    
  a[i].append("
  del a[i][:w]


last=[]
for i in range(w+2):
  last.append("

print("".join(first))
for k in range(h):
  print("".join(a[k][:]))

print("".join(last))

Solution (Python):

h,w=map(int,input().split())
ans=['
print(*ans,sep='\n')

Solution (Python):
h,w = map(int,input().split())

print("

for i in range(h):
    print("
    
print("

Solution (Python):


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

Solution (Python):
h, w = map(int, input().split())
a =[input() for _ in range(h)]

print("
for i in range(h):
    print("
print("

Solution (Python):
H, W = map(int,input().split())
S = [list(input()) for i in range(H)]

Ans = []
for i in range(H+2) :
    Ansi = ["
    if i != 0 and i != H+1 :
        for j in range(W) :
            Ansi[j+1] = S[i-1][j]
    Ans.append(Ansi)

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

Solution (Python):
h,w = map(int, input().split())
l = [input() for _ in range(h)]
l.insert(0,'
l.append('

for i in range(1,h+1):
    l[i] = '

for j in range(h+2):
    print(l[j])

Solution (Python):
h,w = map(int, input().split())
a = list()
for i in range(h):
    a.append(input())
print("
for i in range(h):
    print("
print("

Solution (Python):
h,w = map(int, input().split())
l = [input() for _ in range(h)]
l.insert(0,'
l.append('

for i in range(1,h+1):
    x = list(l.pop(i))
    x.insert(0,'
    x.append('
    l.insert(i,''.join(x))

for j in range(h+2):
    print(l[j])

Solution (Python):
H, W = map(int, input().split())
A_list = []
for i in range(H):
    A = input()
    A_list.append(A)
str1 = ["
str1 = "".join(str1)
for i in range(H+2):
    if i==0 or i==H+1:
        print(str1)
    else:
        print("

Solution (Python):
h,w = map(int,input().split())
x=[input() for i in range(h)]
print("
for i in range(h):
    print("
print("

Solution (Python):
H,W = map(int,input().split())
a = [input() for i in range(H)]
print('
[print('
print('

Solution (Python):
h, w = map(int, input().split())
a = [input() for _ in range(h)]
print("
for i in range(h):
    print("
print("

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

print("".join(["
for i in a:
    print("
print("".join(["

Solution (Python):
def main():
    height, width = map(int, input().split())
    image = ["
    for i in range(1, height + 1):
        image[i] = "
    for i in range(height + 2):
        print(image[i])


if __name__ == '__main__':
    main()

Solution (Python):
h, w = map(int, input().split())
print("
for _ in range(h):
    print("
print("

Solution (Python):
H, W = map(int, input().split())
W = W + 2
print('
for i in range(H):
  print('
print('

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

Solution (Python):
h,w=map(int,input().split())

a=[]
a.append(["
for i in range(h):
    a.append(["
a.append(["

for i in range(h+2):
    for j in range(w+2):
        print(a[i][j],end="")
    print()

Solution (Python):
a, b = map(int, input().split())

A = []
for i in range(a):
    A.append(list(input()))

for i in range(a+2):
    if i == 0:
        print("
    elif i != 0 and i != a+1:
        print("
    elif i == a+1:
        print("

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H,W = map(int,readline().split())
H += 2; W += 2
maze = [["
for _ in range(H-2):
    maze += [list('
maze += [["


for i in maze:
    print("".join(i))

Solution (Python):
h,w=map(int,input().split())
print('
for i in range(h):
  print('
print('

Solution (Python):
H, W = map(int, input().split())
X = []
for _ in range(H):
    X.append(input())

print("
for x in X:
    print("
print("

Solution (Python):

h,w=map(int,input().split())
A=[]
for i in range(h):
    a=input()
    a='
    A.append(a)
s='
A.insert(0,s)
A.append(s)

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

Solution (Python):
h, w = map(int, input().split())

s = []*(h+2)
for i in range(h+2):
    s.append(['

for i in range(h):
    c = input()
    s[i+1][1:w+1] = c

for j in range(h+2):
    print(''.join(s[j]))

Solution (Python):
H, W = map(int, input().split())
mark_list = [["
for i in range(1,H+1):
  w_list = input()
  for j in range(1,W+1):
    mark_list[i][j] = w_list[j-1]


for i in mark_list[0]:
  print(i, end="")
print("")
for i in range(1,H+1):
  for j in range(W+2):
    print(mark_list[i][j], end="")
  print("")
for i in mark_list[H+1]:
  print(i, end="")

Solution (Python):
h, w = map(int, input().split())
grid = [input() for _ in range(h)]
print('
for i in range(h):
    print('
print('

Solution (Python):
h, w = map(int, input().split())
 
for i in range(h+2):
  if i == 0 or i == h+1:
    print("
  else:
    print("

Solution (Python):
H, W = map(int, input().split())
li = [input() for i in range(H)]
buf = ""
for h in range(H) :
    if h == 0 :
        for w in range(W + 2) :
            buf += "
        print(buf)
    print("
    if h == H - 1 :
        print(buf)

Solution (Python):
h,w = map(int,input().split())
a = ["
for i in range(h):
    s = input()
    s = "
    a.append(s)
a.append("
for i in range(len(a)):
    print(a[i])

Solution (Python):
h,w=map(int,input().split())
print("
for i in range(h):
    a=input()
    print("
print("

Solution (Python):
H, W = map(int, input().split())
a = [input() for _ in range(H)]

print('

for i in a:
    print('

print('

Solution (Python):
h,w = map(int,input().split())
l =[[] for i in range(h+2)]
l[0] = "
for i in range(h):
  l[i+1] = "
l[-1] = "

for i in l:
    print(i)

Solution (Python):
h,w=map(int,input().split())
a=[]
a.append("
for i in range(h):
    s="
    a.append(s)
a.append("
for i in a:
    print(i)

Solution (Python):
h,w = map(int,input().split())
st = [input() for _ in range(h)]
print("
for i in st:
    print("
print("

Solution (Python):
h, w = map(int, input().split())
al = list(input() for _ in range(h))

print('
for i in range(h):
    print('
print('

Solution (Python):
h,w=map(int,input().split())
a = [input() for _ in range(h)]
print('
for i in range(h):
  print('
print('

Solution (Python):
H, W = map(int, input().split())
print("
for i in range(H):
    print("
print("

Solution (Python):
h,w = map(int,input().split())
f = lambda x:print('
f(w+2)
for _ in range(h):
  print('
f(w+2)

Solution (Python):
h,w=map(int,input().split())
print("
for i in range(h):
	print("
print("

Solution (Python):
H, W= map(int, input().split())

print("
for _ in range(H):
    print("
    
print("

Solution (Python):
H, W = map(int, input().split())
pic = [input() for i in range(H)]

for i in range(W+2):
  print('
print()
for i in range(H):
  print('
  for j in range(W):
    print(pic[i][j], end = "")
  print('
for i in range(W+2):
  print('

Solution (Python):


h,w=map(int,input().split())
s=["

for i in range(h):
    t=input()
    s.append("

s.append("
for v in s:
    print(v)

Solution (Python):
h, w = map(int, input().split())
a = [input() for _ in range(h)]

print("
for i in range(h):
    t = "
    print(t)
print("

Solution (Python):
h, w = map(int, input().split())
a = [input().split() for _ in range(h)]

print("
for i in range(h):
    t = "".join(["
    print(t)
print("

Solution (Python):
H, W = map(int, input().split())

print('
for i in range(H):
    print('
print('

Solution (Python):
import numpy as np
H,W=map(int,input().split())
a=[list(map(str,list(input()))) for i in range(H)]
f=np.empty((H+2,W+2))
f=f.tolist()



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):
            f[i][j]='
            
        elif (i>0)and(j>0):
            f[i][j]=a[i-1][j-1]
            
for i in f:print(*i, sep='')

Solution (Python):
h,w=map(int,input().split())
print("
for i in range(h):
    t = input()
    print("
print("

Solution (Python):
h, w = map(int, input().split())
hw = []

first_end = ["
hw.append(first_end)

for _ in range(h):
    one_line = list(input())
    one_line.insert(0, "
    one_line.append("
    hw.append(one_line)

hw.append(first_end)

for one_line in hw:
    print("".join(one_line))

Solution (Python):
H,W = map(int,input().split())
a=[]
for i in range(H):
    s = input()
    a.append(s)

ans = []
S=""
for i in range(W+2):
    S=S+"
ans.append(S)
for i in range(H):
    s = "
    for j in range(W):
        s = s+a[i][j]
    s = s+"
    ans.append(s)
ans.append(S)
for i in range(len(ans)):
    print(ans[i])

Solution (Python):
H,W = map(int, input().split())
a = [input() for _ in range(H)]
print('
for i in range(H):
    print('
print('

Solution (Python):
h, w = map(int,input().split())
a = [input() for _ in range(h)]

print('
for i in range(h):
  print('
print('

Solution (Python):
h,w=map(int,input().split())
print("
for i in range(h):
  print("
print("

Solution (Python):




def main():
    H, W = map(int, input().split())
    A = [input() for _ in range(H)]
    print('
    for a in A:
        print('
    print('


if __name__ == "__main__":
    main()

Solution (Python):
h, w = map(int, input().split())
x = "
print (x)
for i in range(h):
	z = input()
	y = "
	print (y)
print (x)

Solution (Python):
h,w=map(int,input().split())

li=[]

for i in range(h):
    li.append(list(input()))

for i in range(len(li)):
    li[i].insert(0,'
    li[i].append('

li.append(['
li.insert(0,['

for i in range(len(li)):
    print("".join(li[i]))

Solution (Python):
h, w = map(int, input().split())
list = []
for x in range(h):
    str = input()
    list.append(str)
for id in range(h + 2):
    if id == 0 or id == h + 1: print('
    else: print('

Solution (Python):
def sharpimage(h , w , a):

    reans = []
    aa = ""

    for i in range(w + 2):
        aa += "

 
    for i in a:
        reans.append("

    reans.insert(0 , aa)
    reans.append(aa)

    return reans

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

    ans = sharpimage(h , w , a)
    for i in range(len(ans)):
        print(ans[i])

if __name__ == '__main__':
    main()

Solution (Python):
h, w = map(int, input().split())
pic = [input() for _ in range(h)]

print("

for p in pic:
    print("

print("

Solution (Python):
h,w=map(int,input().split())
a = [input() for i in range(h)]
b=[]
e=""
for x in range(w+2):
    e+="
b.append(e)
for x in a:b.append("
b.append(e)
print("\n".join(b))

Solution (Python):
c, r = tuple(map(int, input().split()))
print('
for _ in range(c):
    print('
print('

Solution (Python):
H,W=map(int,input().split())
print('
for i in range(H):
  print('
print('