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#
###



Sample input:
2 3
abc
arc


Sample output:
#####
#abc#
#arc#
#####

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
p=input();h,w=map(int,p().split());w+=2;print("#"*w);print("\n".join(["#"+p().strip()+"#"for _ in[0]*h]));print("#"*w)

Submission status: Runtime Error

Solution code:
h,w=map(int,input().split());print("#"*w);print("\n".join(["#"input()"#"for _ in [0]*h]));print("#"*w)

Submission status: Runtime Error

Solution code:
#include<iostream>
using namespace std;

int main()
{
  int h,w;
  cin>>h>>w;
  char name[h][w];
  for(int i=0;i<h;i++)
  {
    for (int j=0;j<w;j++)
    {
    cin>>name[i][j];
    }
  }
  for(int k=0;k<w+2;k++)
  {
    cout<<"#";
  }
  cout<<"\n";
    for(int i=0;i<h;i++)
  {
    cout<<'#';
    for (int j=0;j<w;j++)
    {
    cout<<name[i][j];
    }
    cout<<"#\n";
  }
    for(int k=0;k<w+2;k++)
  {
    cout<<"#";
  }
}

Submission status: Runtime Error

Solution code:
H, W = map(int, input().split())
array = list()
header = ""
for i in range(0, H):
    array[i] = "#" + input() + "#"
for i in range(0, W+2):
    header += "#"
    
print(header)
for p in array:
    print(p)
print(header)

Submission status: Runtime Error

Solution code:
H, W = map(int, input().split())
array = list()
header = ""
for i in range(H):
    array[i] = "#" + input() + "#"
for i in range(0, W+2):
    header += "#"
    
print(header)
for p in array:
    print(p)
print(header)

Submission status: Runtime Error

Solution code:
H, W = input().split()
array = list()
header = ""
for i in range(H):
    array[i] = "#" + input() + "#"
for i in range(0, W+2):
    header += "#"
    
print(header)
for p in array:
    print(p)
print(header)

Submission status: Runtime Error

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

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

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

for i in range(h):
    print("#"+a+"#")

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

Submission status: Runtime Error

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

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

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

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

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

Submission status: Runtime Error

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

a=[]
for i in range(h):
        aline[i] = input().split(" ")

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

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

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

Submission status: Runtime Error

Solution code:
coding:utf-8
import sys

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

print a

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

Submission status: Runtime Error

Solution code:
a = [int(i) for i in input().split()]
b = []
[b.append(input()) for i in range(a[0])]

print('#'*(a[1]+2)+'\n'+'#'+b[0]+'#'+'\n'+'#'+b[1]+'#'+'\n'+'#'*(a[1]+2))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

A = ["#" * (W+2)] + A + ["#" * (W+2)]

for i in A:
    print(i)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

A = ["#" * W+2] + A + ["#" * W+2]

for i in A:
    print(i)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

for i in range(1, H):
    a = input()
    A[i] = ['#' + a + '#']

fr = '#' * (W+2)
A = [fr] + A + [fr]

for i in A:
    print(i)

print('#' + 1 + '#')

Submission status: Runtime Error

Solution code:
def output(H,W,q):
    frame = ""
    for i in range(W+2):
        frame += "#"
    print frame
    while not q.empty():
        print "#" + q.get() + "#"
    print frame


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

output(H,W,q_str)

Submission status: Runtime Error

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

ans=''
for i in range(h):
    ipt = input().split()
    ans+='#'+ipt[0]+ipt[1]+'#'+'\n'
print('#'*(w + 2))
print(ans+'#'*(w + 2))

Submission status: Runtime Error

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


print('#'*(w + 2))
for i in range(h):
    ipt = input().split()
    print('#'+ipt[0]+ipt[1]+'#')
print('#'*(w + 2))

Submission status: Runtime Error

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


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

Submission status: Runtime Error

Solution code:
ipt=input().split()
h,w = [int(n) for n in ipt[:1]]
img= [input().split()[2:]]
print(
    for i in w+2:
        '#',
    "/n",
    for i in h:
    '#',img[w*i,w*(i+1)],'#',"/n"
    for i in w+2:
        ,'#')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import numpy as np

ipt =np.array(input()[3:])

np.pad(ipt,1,'#')

Submission status: Runtime Error

Solution code:
    y, x = map(int, input().split())
    image = ["#" * (x+2)]
    for y in range(0,y):
        image.append("#"  + input() + "#")
    image.append("#" * (x+2))
    for img in image:
        print(img)

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

Solution code:
H,W = buf.split()
H = int(H)
W = int(W)
pic = []
 
for i in range(H):
    pic.append(input())
 
#for row in pic:
#    print(row)
 
for i in range(W+2):
    print("#",end="")
print()
 
for i in range(H):
    print("#"+pic[i]+"#")
 
for i in range(W+2):
    print("#",end="")

Submission status: Runtime Error

Solution code:
H,W = buf.split()
H = int(H)
W = int(W)
pic = []

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

#for row in pic:
#    print(row)

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

for i in range(H):
    print("#"+pic[i]+"#")

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

Submission status: Runtime Error

Solution code:
[x, y] = map(int, raw_input().strip().split())
a = raw_input().strip()
b = raw_input().strip()
print "#" * (y + 2)
print "#" + a + "#"
print "#" * (y + 2)

Submission status: Runtime Error

Solution code:
N, M = map(int ,raw_input().split())
s="#"*(M+2)
a=[]

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

a.append(s)

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