Buggy python submission (verdict: Runtime Error):
H = raw_input().split()
W = raw_input().split()
for height in range(H):
    if height == H-1 or height == 0:
        print "#"*W
    else:
        print "#"+ "."*(W-2)+"#\n"

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
H,W = raw_input().split()
for height in range(H):
    if height == H-1 or height == 0:
        print "#"*W
    else:
        print "#"+ "."*(W-2)+"#\n"

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
H,W = raw_input().spllit()
for height in range(H):
    if height == H-1 or height == 0:
        print "#"*W
    else:
        print "#"+ "."*(W-2)+"#"

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
[h, w] =raw_input().split()
for height in range(h):
    if height == h-1 or height == 0:
        print "#"*w
    else:
        print "#"+ "."*(w-2)+"#"

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
[h, w] =map(int,raw_input().split())
if h == w == 0:
    break

    
for height in range(h):
    if height == h-1 or height == 0:
        print "#"*w
    else:
        print "#"+ "."*(w-2)+"#"

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
while true:
    H,W = [int(if(i) for i input().split("")]
    if H == W == 0:
        break
        print ("#"*(W)
        for h in range(W-2):
            print ("."*(W-2).join("#","#"))
        print ("#"*(W))
        print ()

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
while true:
    H,W = [int(if(i) for i input().split("")]
    if H == W == 0:
        break
        print ("#"*(W)
        for h in range(W-2):
            print ("."*(W-2).join("#","#"))
        print ("#"*(W))
        print ()

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
while true:
    H,W = [int(i) for i input().split("")]
    if H == W == 0:
        break
        print ("#"*(W)
        for h in range(W-2):
            print ("."*(W-2).join("#","#"))
        print ("#"*(W))
        print ()

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
while true:
    H,W = [int(i) for i in input().split("")]
    if H == W == 0:
        break
        print ("#"*(W)
        for h in range(W-2):
            print ("."*(W-2).join("#","#"))
        print ("#"*(W))
        print ()

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
while True:
    H,W=[int(i) for i in input().split(" ")]
    if H==W==0:
        break
    print("#"*(W))
    for h in range(H-2):
        print(("."*(W-2)).join(("#","#")))
    print("#"*(W))
    print()

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
H,W = map(int(x) for x in raw_input().split(""))
for height in range(H):
    if H == W == 0:
        break
    elif height == H-1 or height == 0:
        print "#"*W
    else:
        print "#"+ "."*(W-2)+"#"
print ""

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""

Buggy python submission (verdict: Runtime Error):
H,W = tuple(int(x) for x in raw_input().split(""))
for height in range(H):
    if H == W == 0:
        break
    elif height == H-1 or height == 0:
        print "#"*W
    else:
        print "#"+ "."*(W-2)+"#"
print ""

Fixed submission:
while True:
    h,w = tuple([int(x) for x in raw_input().split(" ")])
    if h==0 and w==0: break
 
    for ih in range(h):
        if ih==0 or ih==h-1 or w <= 2: print "#" * w
        else: print "#" + "." * (w-2) + "#"
 
    print ""