Buggy python submission (verdict: Runtime Error):
while true:
H,W = map(int,raw_input().split())

 if:W==0 and H==0 :
    break
 
 else:
 print ('#' * W + '\n')

 print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
 print ('#'*W + '\n')

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while true:
H,W = map(int,raw_input().split())

 if W==0 and H==0 :
    break
 
 else :
 print ('#' * W + '\n')

 print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
 print ('#'*W + '\n')

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while true:
H,W = map(int,raw_input().split())

 if W==0 and H==0 :
    break
 
 else :
 print ('#' * W + '\n')

 print (('#'+ '.'*(W-2)+ '#'+'\n')*(H-2))
 print ('#'*W + '\n')

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while true:
H,W = map(int,raw_input().split())

 if W==0 and H==0 :
    break
 
 else :
 print ('#' * W + '\n')

 for i in range(H-2) :
   print ('#'+ '.'*(W-2)+ '#'+'\n')

  print ('#'*W + '\n')

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while(true)
if W==0 && H==0 :
	break 
H,W = map(int,raw_input().split())
print "#"*W + "\n"
print ("#"+ "."*(W-2)+ "#"+"\n")*(H-2)
print "#"*W + "\n"

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while true:
if W==0 and H==0 :
    break
H,W = map(int,raw_input().split())
print '#' * W + '\n'
/*実行すると、この直前の行でerrorになる。なぜ。。。*/
print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
print '#'*W + '\n'

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while true:
H,W = map(int,raw_input().split())
if W==0 and H==0 :
    break
print '#' * W + '\n'

print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
print '#'*W + '\n'

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while True:
H,W = map(int,raw_input().split())
if W==0 and H==0 :
    break
print '#' * W + '\n'

print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
print '#'*W + '\n'

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while true:
H,W = map(int,raw_input().split())

 if W==0 and H==0 :
    break

 print '#' * W + '\n'

 print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
 print '#'*W + '\n'

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')

Buggy python submission (verdict: Runtime Error):
while true:
H,W = map(int,raw_input().split())

 if W==0 and H==0 :
    break
 
 elif :
 print '#' * W + '\n'

 print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
 print '#'*W + '\n'

Fixed submission:
while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')