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):
h, w = [int(i) for i in input().split(" ")]

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

Solution (Python):
list(map(print,(lambda a:['

Solution (Python):
list(map(print, (lambda a:['

Solution (Python):
H, W = map(int, input().split())
a = ["
print("\n".join(a))

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

for h in range(H + 2):
    if h in [0, H + 1]:
        print('
    else:
        print('

Solution (Python):
def twoDimArraywithwall(row,column,n,wallchar): return [[n if j!=0 and j!=(column+1) else wallchar for j in range(column+2)] if i!=0 and i!=(row+1) else [wallchar]*(column+2) for i in range(row+2)]
def maketwodimarraywithwall(matrix,wallchar):
    rownum=len(matrix)
    colnum=len(matrix[0])
    ret=twoDimArraywithwall(rownum,colnum,None,wallchar)
    for i in range(rownum):
        for j in range(colnum):
            ret[i+1][j+1]=matrix[i][j]
    return ret


H, W = map(int, input().split())
table = []
for h in range(H):
    table.append(list(input())) 
table=maketwodimarraywithwall(table,"
for i in table:
    print("".join(i))

Solution (Python):
H, W = map(int, input().split())
table = []
for h in range(H):
    table.append(input())
print("
for h in range(H):
    print("
print("

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

Solution (Python):





def main():
    H, W = map(int, input().split())

    print("
    for _ in range(H):
        s = input()
        print("
        print(s, end="")
        print("
    print("

if __name__ == "__main__": main()

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

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

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

print "".join(["
for _ in range(h):
    st = raw_input()
    print "
print "".join(["

Solution (Python):

H, W = [int(x) for x in input().strip().split(' ')]
image = []
for row in range(H):
    image.append(input().strip())
print("
for i in range(H):
    print("
print("

Solution (Python):
def debug_print_joined(l):
    for col in l:
        print("".join(col))


def solve(): 
    H, W = list(map(int, input().split(" ")))
    A = []
    for _ in range(H):
        A.append(list(input()))

    for i in range(H):
        A[i].insert(0, "
        A[i].append("

    A.insert(0, ["
    A.append(["

    debug_print_joined(A)


solve()

Solution (Python):

"""
http://abc062.contest.atcoder.jp/tasks/abc062_b

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    H, W = map(int, input().split())
    data = []
    for _ in range(H):
        data.append(input().strip())

    frame = ['

    for d in data:
        frame.append('
    frame.append('

    for line in frame:
        print(line)


if __name__ == '__main__':
    main(sys.argv[1:])

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

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

Solution (Python):
x,y = map(int,input().split())
print("
for i in range(x):
    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())
for i in range(H+2):
    if i == 0 or i == H + 2 - 1:
        print('
    else:
        a = input()
        print('

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

print('

for i in range(H):
    print('

print('

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

Solution (Python):
H, W = list(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):
    s = input()
    print('

print('

Solution (Python):
H, W = map(int, input().split())
array = list()
header = ""
for i in range(0, H):
    array.append("
for i in range(0, W + 2):
    header += "

print(header)
for p in array:
    print(p)
print(header)

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

Solution (Python):
h,w=[int(x) for x in input().split()]
a=[]
for i in [None]*h:
    a.append(input())
print("
for i in a:
    print("
print("

Solution (Python):
size=[int(i) for i in input().split()]
image=[[str(input())] for i in range(size[0])]

print("
for i in image:
    print(''.join(["
print("

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

dat = [input() for i in range(h)]
print("

print(*("
print("

Solution (Python):
def main():
    h, w = map(int, input().split())
    mat = [['

    inp = [[c for c in input()] for _ in range(h)]
    for i in range(1, h+1):
        for j in range(1, w+1):
            mat[i][j] = inp[i-1][j-1]

    for i in range(h+2):
        print(''.join(mat[i]))


if __name__ == "__main__":
    main()

Solution (Python):
H, W = map(int, input().split())
string = list()
for i in range(H):
    string.append(input())

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

print("")

for i in range(H):
    print("
    print(string[i], end="")
    print("

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

Solution (Python):
import sys
HW = map(int, raw_input().split())
text = []
for i in range(HW[0]):
	 text.append(raw_input())
for j in range(HW[1] + 2):
	sys.stdout.write('
print
for i in range(HW[0]):
	sys.stdout.write('
	sys.stdout.write(text[i])
	print('
for j in range(HW[1] + 2):
	sys.stdout.write('
print

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

l_n=[input() for i in range(H)]

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

for i in range(H):
    print('

for i in range(W+2):
    print('

Solution (Python):
h, w = map(int, 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("
        else:
            print(a[i-1][j-1], end ="")
    print()

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

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

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

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

b = "

print(b)
for i in range(h):
    ans = li[i]
    print("

print(b)

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 = list(map(int, input().split(" ")))

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

Solution (Python):

h, w = map(int, input().split())
pict =[]
for i in range(h):
    pict.append(input().rstrip())
    pict[i] = '
pict.insert(0,'
pict.append('
for i in range(len(pict)):
    print(pict[i])

Solution (Python):
if __name__ == "__main__":
    H,W = map(int, input().split())
    board = []
    for x in range(H):
        board.append(input())
    print ('
    for y in range(H):
        print ('
    print ('

Solution (Python):
import sys

h, w = map(int, raw_input().split())
img = []
for i in range(h):
    r = raw_input()
    img.append(r)

print ''.join(['
for r in img:
    sys.stdout.write('
    sys.stdout.write(r)
    sys.stdout.write('
    print
print ''.join(['

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

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

for i in range(W+2):
    print('

print('')
for j in s:
    print('
    print(j, end="")
    print('
    print('')

for i in range(W+2):
    print('

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

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

for i in range(W+2):
    print('

print('')
for j in s:
    print('
    print(j, end="")
    print('
    print('')

for i in range(W+2):
    print('

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

answer = ""
for i in range(W+2):
    answer += "
answer += "\n"
for pic in gazo:
    answer += "
    answer += "".join(pic)
    answer += "
    answer += "\n"
for i in range(W+2):
    answer += "

print(answer)

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

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

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):
from collections import defaultdict


def main():
    H, W = map(int, input().split())
    ans = ["
    for _ in range(H):
        ans += ["
    ans += ["
    print("\n".join(ans))


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):


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

print('
for i in range(len(a)):
    print( '
print('

Solution (Python):
h,w = map(int,input().split())
word = []
for i in range(h):
    word.append(input())
 
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):
from functools import reduce
h,w = [int(i) for i in input().split()]
a = []
for i in range(0,h):
    a.append('
udFrame = reduce(lambda x,y: x+y, ['
print(udFrame)
for pic in a:
    print(pic)
print(udFrame)

Solution (Python):
import sys

H,W = raw_input().split()
a =[]
for line in range(int(H)):
    a.append(raw_input())

for i in range(0,int(W)+2):
    sys.stdout.write("
print

for i in range(0,int(H)):
    sys.stdout.write("
    for j in range(0,int(W)):
        sys.stdout.write(a[i][j])
    sys.stdout.write("
    print

for i in range(0,int(W)+2):
    sys.stdout.write("
print

Solution (Python):


from numpy import *

H, W = raw_input().split()

h = int(H)
w = int(W)

a = []

for i in range(h):
    a.append(raw_input())

for i in range(h):
    a[i] = '
    a[i] = a[i] + '

temp = '

for i in range(len(a[i]) - 1):
    temp = temp + '

print temp

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

print temp

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

if __name__ == '__main__':
    main()

Solution (Python):


import sys
import subprocess
import json
import time
import math
import re
import sqlite3

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

a.append('

for i in range(H):
    a.append(input())
    
a.append('

for i in range(len(a)):
    a[i] = '
    print(a[i])

Solution (Python):


A=map(int, raw_input().split())
H=A[0]
W=A[1]

print "

for i in range(H):
    print "

print "

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

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

print('
for row_a in a:
    print('
print('

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

for i in range(H):
    A.append(input())

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

Solution (Python):
import sys




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

s = '
print(s)
for ligne in a:
    l = list(ligne)
    l.append('
    l.insert(0, '
    ligne2 = ''.join(l)
    print(ligne2)
print(s)

Solution (Python):
H, W = map(int, raw_input().split())
picture = [list("
for i in xrange(1, H+1):
    a = list(raw_input())
    for j in xrange(1, W+1):
        picture[i][j] = a.pop(0)
for p in picture:
    print "".join(p)

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

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

Solution (Python):
a=input().split()
x=int(a[1])+2
s=[]
for i in range(int(a[0])):
    s.append(input())
print("
for i in range(int(a[0])):
    print("
print("

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

for i in range(h):
    print("
    print(s[i],end="")
    print("
for i in range(w+1):
    print("
print("

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

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

Solution (Python):
indata = raw_input().split()
i = int(indata[0])
j = int(indata[1])
pixcel = []

for count in range(i):
    datalist = raw_input()
    pixcel.append(datalist)

showline = []
headder = ""
l = ""

for x in range(j + 2):
    headder = headder + "
showline.append(headder)

for s in pixcel:
   l = "
   showline.append(l)
showline.append(headder)

for line in showline:
    print line

Solution (Python):


h, w = [int(x) for x in input().split()]
strs = [input() for x in range(h)]

print('
for x in strs:
	print('
print('

Solution (Python):


import sys

input = [int(i) for i in sys.stdin.readline().split(' ')]
input_matrix = []

for i in range(input[0]):
	input_matrix.append(sys.stdin.readline().replace('\n',''))

for i in range(input[1] + 2):
	print('
print()

for i in range(input[0]):
	print('
	print(input_matrix[i],end='')
	print('
	
for i in range(input[1] + 2):
	print('

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

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

Solution (Python):
hw = raw_input().split(" ")
h = int(hw[0])
w = int(hw[1])
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())

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

Solution (Python):

x, y = [int(i) for i in input().split()]
s = [input() for i in range(x)]

ans = []

r0 = ''
for i in range(y+2):
    r0 += '
ans.append(r0)

for ss in s:
    ans.append('

ans.append(r0)

for a in ans:
    print(a)

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

image = ["".join(["
image.insert(0, "
image.append("

for i in image:
    print(i)

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

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

print("

for i in x:
    print("

print("

Solution (Python):
a = input().split()
h = int(a[0])
w = int(a[1])

x = []
for i in range(h):
    x.append(input())
    
print("

for i in x:
    print("
    
print("

Solution (Python):

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

for i in range(x[1]+2):
    print('
print('')
for i in a:
    print('
for i in range(x[1]+2):
    print('
print('')

Solution (Python):
if __name__ == "__main__":
    height, width = list(map(int, input().split()))
    input = [input() for i in range(height)]

    sharps = "
    print(sharps)
    for i in range(height):
        print("
        print(input[i], end="")
        print("
    print(sharps)

Solution (Python):


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

A = ["

for i in A:
    print(i)

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

sha = ''.join(['
a = [sha]

for j in range(h):
    a.append('

a.append(sha)

for k in a:
    print(k)

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    h,w = LI()
    a = ['

    return '\n'.join(a)



print(main())

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

Solution (Python):
y, x = map(int, input().split(" "))
 
h = []
for v in range(0, x+2):
    h.append("
    
h = ''.join(h)
print(h)
for v in range(0, y):
    print("
 
print(h)

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

Solution (Python):


import Queue

def output_frame(w):
    f = ""
    for i in range(w+2):
        f += "
    return f

H,W = map(int, raw_input().split())
q_str = Queue.Queue()
for i in range(H):
    q_str.put(raw_input())

print output_frame(W)
while not q_str.empty():
    print "
print output_frame(W)

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

s = []
for i in range(h):
  s.append(raw_input())

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

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

if __name__ == "__main__":
    solve()

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

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

ans=''
for i in range(h):
    ans+='
print('
print(ans+'

Solution (Python):

H, W = [int(n) for n in input().split()]
image = []
for i in range(H):
    image.append(input())

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

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


inputs = []
for i in range(H):
    inputs.append(input())

first_line = "".join("

print(first_line)
for i in range(H):
    print("
print(first_line)

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

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

Solution (Python):
y, x = map(int, input().split())
image = ["
for y in range(0,y):
    image.append("
image.append("
for img in image:
    print(img)

Solution (Python):
from __future__ import division
import math


def get_min(w, h):
    m = 1e11
    for x in [w // 3, w // 3 + 1]:
        if x == 0: continue
        a = [x*h, (w-x)*(h//2), (w-x)*(h - h//2)]
        print a
        m = min(m, max(a) - min(a))
    return m

digits = raw_input()
a, b = [int(x) for x in digits.split(' ')]
m = []
for i in range(a):
    s = raw_input()
    m.append(s)
print ''.join(['
for i in range(a):
    print '
print ''.join(['

Solution (Python):
h, w = map(int, input().split())
print('
print('\n'.join('
print('

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

for i in range(0,W+2):
    print("
print()

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

for i in range(0, W+2):
      print("
print()

Solution (Python):

y, x = map(int, input().split(" "))
line = "
print(line)
for n in range(y):
    line = input()
    print("
line = "
print(line)

Solution (Python):
""" abc062_b:B - Picture Frame """
L = input().rstrip().split(' ')
H = int(L[0])
W = int(L[1])

print("".rjust(W + 2, '
for i in range(H):
    print("
print("".rjust(W + 2, '

Solution (Python):
s = input().split()
h = int(s[0])
w = int(s[1])

ain = ["" for i in range(h)]

for i in range(h):
    ain[i] = input()

aout = ["" for j in range(h+2)]

aout[0] = "

for i in range(h):
    aout[i+1] = "

aout[h+1] ="

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

Solution (Python):
h, w = map(int, input().strip().split(' '))
horizontal_frame = "

print(horizontal_frame)
for i in range(h):
    image_row = "
    print(image_row)
print(horizontal_frame)

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

src = []
for i in range(H):
    src.append(raw_input())

print "
for row in src:
    print "
print "

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

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


 
for i in range(W+2):
    print("
print()
 
for i in range(H):
    print("
 
for i in range(W+2):
    print("

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

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

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

if __name__ == '__main__':
	picture_frame()

Solution (Python):
import sys

h, w = [int(x) for x in sys.stdin.readline().split()]

def printer(h,w):
	for _ in range(h):
		s = input()
		s = s.replace(' ','')
		print('

print('
printer(h, w)
print('

Solution (Python):
a = input().split(" ")

tmp_out=[[""] for i in range(int(a[0])+2)]

for j in range(int(a[1])+2):
    tmp_out[0]=["".join(tmp_out[0]+["

for i in range(1, int(a[0])+1):
    tmp_out[i]=["".join(["

tmp_out[int(a[0])+1]=tmp_out[0]

for i in range(int(a[0])+2):
    print("".join(tmp_out[i]))

Solution (Python):
a = input().split(" ")

tmp_out=[[""] for i in range(int(a[0])+2)]

for j in range(int(a[1])+2):
    tmp_out[0]=["".join(tmp_out[0]+["

for i in range(1, int(a[0])+1):
    tmp=input().split(" ")
    tmp_out[i]=["".join(["

tmp_out[int(a[0])+1]=tmp_out[0]

for i in range(int(a[0])+2):
    print("".join(tmp_out[i]))

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


print('

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

Solution (Python):


h, w = [int(x) for x in input().split(' ')]

ans = (w + 2) * '

for i in range(h):
    ans += '

ans += (w + 2) * '

print(ans)

Solution (Python):

H, W = map(int, input().split())
a = []
b = []
for tmp in range(H):
    a.append(list(input()))
add = [ '
b.append(add)
for tmp in range(H):
    c = ['
    b.append(c)
b.append(add)
for tmp in range(H+2):
    print(''.join(b[tmp]))

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

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

ans = list()
head = "

print(head)
for i in range(H):
   print("
print(head)

Solution (Python):
h,w = map(int, raw_input().split())
l = [ '
s = '
print s
for t in l:
    print t
print s

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

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

A = [raw_input() for _ in range(H)]

print "
for a in A:
    print "
print "

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


blank = ["
print("".join(blank))
for line in range(H):
    print("
print("".join(blank))

Solution (Python):
from sys import stdin
n,m = map(int,stdin.readline().split())
x = '
print x 
for _ in xrange(n):
    a = stdin.readline().strip()
    print '
print x

Solution (Python):
H, W = map(int, raw_input().split())
print "
for y in range(H):
    s = raw_input()
    print "
print "

Solution (Python):
import sys

def solve():
    h, w = map(int, input().split())

    print('

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

    print('

if __name__ == '__main__':
    solve()

Solution (Python):
h, w = map(int, raw_input().split())
strings = []
for i in range(h):
    strings.append(raw_input())
print '
for string in strings:
    print '
print '

Solution (Python):
def read(): return list(map(int, input().split()))


h, w = read()
lines = [input() for y in range(h)]

print("

for line in lines:
    print("
    print(line, end="")
    print("

print("

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

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

print('

Solution (Python):
h,w=map(int,raw_input().split())
r='
s=[]
s.append(r)
for i in xrange(h):
 t='
 s.append(t)
s.append(r)
for i in xrange(h+2):
 print s[i]

Solution (Python):
[x, y] = map(int, raw_input().strip().split())
st = []
for i in range(x):
    st.append(raw_input().strip())
print "
for i in range(x):
    print "
print "

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

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

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

for i in range(W+2):
        print('
print("")

for i in range(H):
        print('
        print(str[i], end = "")
        print('

for i in range(W+2):
        print('
print("")

Solution (Python):


x, y = map(int,raw_input().split())

print "

for i in range(x):
	a = raw_input()
	print "

print "

Solution (Python):
inputnums = input().split()                                                                   
x = int(inputnums[0])
y = int(inputnums[1])
inputstr=[]
for i in range(x):
        inputstr.append(input())
pixel=[]
pixel.append("
for i in range(x):
        pixel.append("


pixel.append("
output=""
for i in range(len(pixel)):
    output+=pixel[i]+"\n"

print(output)

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

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

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

print("
for i in range(H):
    print("
    print(input().strip(), end = "")
    print("

print("

Solution (Python):


H,W=map(int,raw_input().split())
arr=[['
for i in range(H):
    line=map(str,raw_input())
    line.insert(0,'
    line.append('
    arr[i]=line

print '
for i in range(H):
    print "".join(arr[i])
print '

Solution (Python):
nums = [int(x) for x in input().split()]

pic = []
for i in range(nums[0]):
	line = input()
	pic.append(line)

for i in range(nums[1]+2):
	print("
print("\n", end="")
for words in pic:
	print("
	print(words, end="")
	print("

for i in range(nums[1]+2):
	print("
print("\n", end="")

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

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

Solution (Python):
size = input()
size = size.split()

print("

for i in range(int(size[0])):
	row = input()
	print("

print("

Solution (Python):
data = input().split()
H = int(data[0])
W = int(data[1])

str = []
for i in range(H):
	data = input()
	str.append(data[:W])

for j in range(W+2):
	print("
print("")
for i in range(H):
	print("
	print("".join(str[i]), end="")
	print("
for j in range(W+2):
	print("

Solution (Python):
import sys

if __name__ == '__main__':
    count = 0
    D = []
    for line in sys.stdin:
        if count == 0:
            line = line.rstrip("\n").split(" ")
            H = int(line[0])
            W = int(line[1])
            count+=1

        else:
            D.append(line.rstrip("\n"))

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

Solution (Python):
N, M = map(int ,raw_input().split())
s="
a=[]

a.append(s)
for i in range(N):
    a.append("
a.append(s)

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

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


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

for i in range(h):
    print("

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

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

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

Solution (Python):
h, w = map(int, input().split())
lst = []
for i in range(h):
    lst.append(list(input().split()))
    lst[i].insert(0, "
    lst[i].append("
head = ["
bottom = head

print("".join(head))
for i in range(h):
    print("".join(lst[i]))
print("".join(bottom))

Solution (Python):
h,w = map(int,input().split())
s = []
for _ in range(h):
  s.append(input().strip())
print('
for c in s:
  print('
print('

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

print("
for i in range(H):
 print("
 for j in L[i]:
  print(j, end="")
 print("
print("

Solution (Python):
H, W = [int(x) for x in input().split()]
image = list()
for i in range(H):
	image.append('

print ('
for i in range(H):
	print(image[i])
print ('

Solution (Python):

mat_small = []
xy = input().split(' ')
for i in range(int(xy[0])):
    mat_small.append(input())

big  = [(int(xy[1])+ 2)* '

for s in range(1, (int(xy[0])+ 1)):
    big[s] = '

for v in big:
    
    print(v)

Solution (Python):
def solve() :
    ri = raw_input()

    inarr = ri.split(' ')
    h = inarr[0]
    w = inarr[1]

    print '
    for i in range(0, int(h)) :
        line = raw_input()
        print ('
    print '

if __name__ == '__main__':
    solve()

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 = list(map(int,input().split()))
data = [input() for i in range(H)]
print("
for i in range(H):
	print("
print("

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

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

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

if __name__ == '__main__':
	picture_frame()

Solution (Python):
x, y = map(int,input().split())

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

for i in range(x) :
  print ('
  print (input(), end = '')
  print ('

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

Solution (Python):
def main():
    H, W = map(int, input().split())
    a = [None] * H
    i = 0
    while i < H:
        a[i] = str(input())
        i += 1

    print('
    for s in a:
        print('
    print('

main()

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

print("
for i,b in enumerate(a):
  print("
print("

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

Solution (Python):


H,W = map(int,raw_input().split(" "))

lista = []
for i in range(H):
	lista.append([map(str,raw_input().split(" "))])

result = []
stre = ""
for i in range(W+2):
	stre = stre + "

print stre

for i in lista:
	stre1 = "
	for k in i:
		stre1 = stre1 + k[0]
	stre1 = stre1 + "
	print stre1

print stre