Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
data = [
    [[0 for r in range(10)]for f in range(3)] for b in range(4)
]

for b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()

    if bi < 3:
    print('#'* 20)

Fixed submission:
data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]
 
count =int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v
 
for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
 
        print()
    if bi < 3:
        print('#' * 20)

Buggy python submission (verdict: Runtime Error):
data = [
    [[0 for r in range(10)]for f in range(3)] for b in range(4)
]

# ??\??????????????????????????§????????????????????????????????????


for b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()

    if bi < 3:
    ??????print('#'* 20)

Fixed submission:
data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]
 
count =int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v
 
for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
 
        print()
    if bi < 3:
        print('#' * 20)

Buggy python submission (verdict: Runtime Error):
data = [
    [[0 for r in range(10)]for f in range(3)] for b in range(4)
]

# ??\??????????????????????????§????????????????????????????????????
count = int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1[f-1][r-1] += v

for b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()

    if bi < 3:
    ??????print('#'* 20)

Fixed submission:
data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]
 
count =int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v
 
for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
 
        print()
    if bi < 3:
        print('#' * 20)

Buggy python submission (verdict: Runtime Error):
data = [
    [[0 for r in range(10)]for f in range(3)] for b in range(4)
]


count = int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1[f-1][r-1] += v

for b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()

    if bi < 3:
    ??????print('#'* 20)

Fixed submission:
data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]
 
count =int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v
 
for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
 
        print()
    if bi < 3:
        print('#' * 20)
Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total< 30:
        print('F')

    elif total < 50 anfd r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')
        
    else:
        print('A')

Fixed submission:


while True:
   m, f, r = [int(i) for i in input().split()]
  
   if m == f == r == -1:
      break
   total = m + f
   if m == -1 or f == -1 or total < 30:
      print("F")
    
   elif total < 50 and r < 50:
      print("D")
 
   elif r >= 50 or total < 65:
      print("C")
    
   elif total < 80:
      print("B")
 
   else:
      print("A")
Buggy python submission (verdict: Runtime Error):
r, c = [int(i) for i in input().split()]

data = []
sum_row = [0] * (c + 1)

for ri in range(r):
    data.append([int(i) for i in input().split()])
    data[ri].append(sum(data[ri]))
    print(" ".join([str(d) for d in data[ri]]))
    for ci in range(c + 1):
        sum_row[ci] += data[ri][ci]

print(" ".join([str(s) for d in sum_row]))

Fixed submission:
r, c = [int(i) for i in input().split()]

data = []
sum_row = [0] * (c + 1)

for ri in range(r):
    data.append([int(i) for i in input().split()])
    data[ri].append(sum(data[ri]))
    print(" ".join([str(d) for d in data[ri]]))
    for ci in range(c + 1):
        sum_row[ci] += data[ri][ci]

print(" ".join([str(s) for s in sum_row]))
Buggy python submission (verdict: Runtime Error):
n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        c.append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

from  pprint import pprint
pprint(c)

Fixed submission:

n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for ni in range(n):
    print(" ".join([str(s) for s in C[ni]]))

Buggy python submission (verdict: Runtime Error):

n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        c.append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for li in range(l):
    print(" ".join([str(s) for s in C[ni]]))

Fixed submission:

n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for ni in range(n):
    print(" ".join([str(s) for s in C[ni]]))

Buggy python submission (verdict: Runtime Error):

n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        c.append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for ni in range(n):
    print(" ".join([str(s) for s in C[ni]]))

Fixed submission:

n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for ni in range(n):
    print(" ".join([str(s) for s in C[ni]]))
Buggy python submission (verdict: Runtime Error):
import  string

count = {x: 0 for x in string.ascii_lowercase}
lines = ""

while True:
    try:
        lines += input().lowwer()
    except EOFError:
        break

fpr c in lines:
if 'a' <= c <= 'z':
    count[c] += 1

for key,num in count.items():
    print("{0} : {1}".format(key, count[key]))

Fixed submission:
import string
  
count = {x: 0 for x in string.ascii_lowercase}
lines = ""
  
while True:
    try:
        lines += input().lower()
    except EOFError:
        break
          
for c in lines:
    if 'a' <= c <= 'z':
        count[c] += 1
          
for key in string.ascii_lowercase:
    print("{0} : {1}".format(key, count[key]))

Buggy python submission (verdict: Runtime Error):
import  string

count = {x: 0 for x in string.ascii_lowercase}
lines = ""

while True:
    try:
        lines += input().lower()
    except EOFError:
        break

fpr c in lines:
    if 'a' <= c <= 'z':
    count[c] += 1

for key in string.ascii lowercase:
    print("{0} : {1}".format(key, count[key]))

Fixed submission:
import string
  
count = {x: 0 for x in string.ascii_lowercase}
lines = ""
  
while True:
    try:
        lines += input().lower()
    except EOFError:
        break
          
for c in lines:
    if 'a' <= c <= 'z':
        count[c] += 1
          
for key in string.ascii_lowercase:
    print("{0} : {1}".format(key, count[key]))
Buggy python submission (verdict: Runtime Error):
s = input()
p = input()
????
s += s[:len(p)]
if p in s:
????????print("Yes")
else:
????????print("No")

Fixed submission:
s = input()
p = input()
  
s += s[:len(p)]
if p in s:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
w = input()
while True
    line = input()
    if line == 'END_OF_TEXT':
        break

     for s in line.lower().split():
         if s == W:
             count += 1

print(count)

Fixed submission:
W = input()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
     
    for s in line.lower().split():
        if s == W:
            count += 1
             
         
     
print(count)

Buggy python submission (verdict: Runtime Error):
w = input().lower()
while True
    line = input()
    if line == 'END_OF_TEXT':
        break

     for s in line.lower().split():
         if s == W:
             count += 1

print(count)

Fixed submission:
W = input()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
     
    for s in line.lower().split():
        if s == W:
            count += 1
             
         
     
print(count)

Buggy python submission (verdict: Runtime Error):
w = input().lower()
while True
    line = input()
    if line == 'END_OF_TEXT':
        break

     for s in line.lower().split():
         if s == W:
             count += 1

print(count)

Fixed submission:
W = input()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
     
    for s in line.lower().split():
        if s == W:
            count += 1
             
         
     
print(count)

Buggy python submission (verdict: Runtime Error):
W = input().lower()
while True
    line = input()
    if line == 'END_OF_TEXT':
        break

     for s in line.lower().split():
         if s == W:
             count += 1

print(count)

Fixed submission:
W = input()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
     
    for s in line.lower().split():
        if s == W:
            count += 1
             
         
     
print(count)

Buggy python submission (verdict: Runtime Error):
w= input().lower()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
 
    for s in line.lower().split():
        if s == W:
            count += 1
 
print(count)

Fixed submission:
W = input()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
     
    for s in line.lower().split():
        if s == W:
            count += 1
             
         
     
print(count)

Buggy python submission (verdict: Runtime Error):
W = input()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
     
    for s in line.lower().split():
        if s == W:
            count += 1
             
         
     
print(count

Fixed submission:
W = input()
 
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
     
    for s in line.lower().split():
        if s == W:
            count += 1
             
         
     
print(count)
Buggy python submission (verdict: Runtime Error):
x = input()
print(x**3)

Fixed submission:
x = int(input())
print(x ** 3)

Buggy python submission (verdict: Runtime Error):
x = input()
print(x ** 3)

Fixed submission:
x = int(input())
print(x ** 3)
Buggy python submission (verdict: Runtime Error):
r = int(input())
import math
a = r*r*math.pi
b = r*2*math.pi
print('%s %s'%(a,b))

Fixed submission:
r = float(input())
import math
a = r*r*math.pi
b = r*2*math.pi
print('%s %s'%(a,b))

Buggy python submission (verdict: Runtime Error):
r = int(input())
a = r*r*3.1415926535897932
b = r*2*3.1415926535897932
print('%s %s'%(a,b))

Fixed submission:
r = float(input())
import math
a = r*r*math.pi
b = r*2*math.pi
print('%s %s'%(a,b))
Buggy python submission (verdict: Runtime Error):
x=int(input())
y=int(input())

print(x*y end=""2*(x*y))

Fixed submission:
x,y=map(int,input().split())
print (x*y,2*(x+y))
Buggy python submission (verdict: Runtime Error):
s=int(input())
m=s//60
h=s//3600
print(h,m,s,sec=":")

Fixed submission:
sec=int(input())
m=sec//60%60
h=sec//3600
s=sec%60
print(h,m,s,sep=":")
Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
print("{0:.10f}".format(r*r*math.pi),"{0:.10f}".format(2*r*math.pi))

Fixed submission:
import math
r = float(input())
print("{0:.10f}".format(r*r*math.pi),"{0:.10f}".format(2*r*math.pi))
Buggy python submission (verdict: Runtime Error):
RC = input().split()
r = int(RC[0])
c = int(RC[1])
A_c_sum = [0, 0, 0, 0, 0]
final_sum = 0
for i in range(r):
    A_r = input().split()
    A_r_sum = 0
    for j in range(c):
        A_c_sum[j] += int(A_r[j])
        print(A_r[j]+" ", end="")
        A_r_sum += int(A_r[j])
    print(A_r_sum)
    final_sum += A_r_sum
print(" ".join(map(str,A_c_sum))+" ",end="")
print(final_sum)

Fixed submission:
RC = input().split()
r = int(RC[0])
c = int(RC[1])
A_c_sum =[]
final_sum = 0
for j in range(c):
    A_c_sum.append(0)
for i in range(r):
    A_r = input().split()
    A_r_sum = 0
    for j in range(c):
        A_c_sum[j] += int(A_r[j])
        print(A_r[j]+" ", end="")
        A_r_sum += int(A_r[j])
    print(A_r_sum)
    final_sum += A_r_sum
print(" ".join(map(str,A_c_sum))+" ",end="")
print(final_sum)
Buggy python submission (verdict: Runtime Error):
print(int(input()) ** int(input()))

Fixed submission:
print(int(input()) ** 3)
Buggy python submission (verdict: Runtime Error):
s = int(input())
print("{0}:{1}:{2}".format(map(int, [s/3600, s/60, s])))

Fixed submission:
s = int(input())
print("{0}:{1}:{2}".format(*map(int, [s/3600, s%3600/60, s%60])))

Buggy python submission (verdict: Runtime Error):
s = int(input())
print("{0}:{1}:{2}".format(tuple(map(int, [s/3600, s%3600/60, s%60]))))

Fixed submission:
s = int(input())
print("{0}:{1}:{2}".format(*map(int, [s/3600, s%3600/60, s%60])))
Buggy python submission (verdict: Runtime Error):
no = input()
answer = no**3

print(answer)

Fixed submission:
x = int(input())
print(x**3)
Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split()))
print(x[0]*x[1] x[0]*2+x[1]*2)

Fixed submission:
a,b = map(int, input().split())
print(a*b, a*2+b*2)

Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split()))
print(x[0]*x[1] x[0]*2+x[1]*2)

Fixed submission:
a,b = map(int, input().split())
print(a*b, a*2+b*2)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8

X = amp(int, raw_input().split())
R = X[0]*X[1]
P = 2*X[0]+2*X[1]
A = str(R)+" "+str(P)
print(A)


Fixed submission:
# -*- coding: utf-8

x = input()
y = x*x*x
print(y)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

x = map(int, raw_input(),split())
a = x[0]
b = x[1]

R = a*b
P = 2*a+2*b
A = str(R)+" "+str(P)

print(A)


Fixed submission:

a = map(int, raw_input().split())

print('%s %d' % (a[0]*a[1], 2*a[0]+2*a[1]))
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8

X = input()

H = X // 3600

M = (X - H*3600) // 60

S = (X - H*3600) % 60

print('%s:%d:%m' % (H,M,S))


Fixed submission:
# -*- coding: utf-8

X = input()

H = X / 3600
M = (X % 3600) / 60
S = (X % 3600) % 60

print('%d:%d:%d' % (H,M,S))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

a = []

while True:
   n = input():
   if n == 0:
      break
   a.append(n)

for i in range(len(a)):
   print('Case %i: %i' % (i+1,a[i]))





Fixed submission:
# -*- coding: utf-8

a = []

while True:
   n = input()
   if n == 0:
      break
   a.append(n)

for i in range(len(a)):
   print('Case %i: %i' % (i+1,a[i]))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   A = raw_input().split()
   if A[1] == '?':
      break
   elif A[1] == '+':
      print(int(A[0])+int(A[2])
   elif A[1] == '-':
      print(int(A[0])-int(A[2])
   elif A[1] == '*':
      print(int(A[0])*int(A[2])
   elif A[1] == '/':
      print(int(A[0])/int(A[2])





Fixed submission:
# -*- coding: utf-8

while True:
   A = raw_input().split()
   if A[1] == '?':
      break
   if A[1] == '+':
      print(int(A[0])+int(A[2]))
   if A[1] == '-':
      print(int(A[0])-int(A[2]))
   if A[1] == '*':
      print(int(A[0])*int(A[2]))
   if A[1] == '/':
      print(int(A[0])/int(A[2]))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   A = raw_input().split()
   if A[1] == '?':
      break
   if A[1] == '+':
      print(int(A[0])+int(A[2])
   if A[1] == '-':
      print(int(A[0])-int(A[2])
   if A[1] == '*':
      print(int(A[0])*int(A[2])
   if A[1] == '/':
      print(int(A[0])/int(A[2])





Fixed submission:
# -*- coding: utf-8

while True:
   A = raw_input().split()
   if A[1] == '?':
      break
   if A[1] == '+':
      print(int(A[0])+int(A[2]))
   if A[1] == '-':
      print(int(A[0])-int(A[2]))
   if A[1] == '*':
      print(int(A[0])*int(A[2]))
   if A[1] == '/':
      print(int(A[0])/int(A[2]))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

a = map(int,raw_input().split())

k = a[0]
b = sorted(a[1])

min = b[0]
Max = b[k-1]

sum = 0
for i in b:
   sum += i

print('%i %i %i' % (min,Max,sum)




Fixed submission:
# -*- coding: utf-8

k = input()
a = map(int,raw_input().split())

b = sorted(a)

min = b[0]
Max = b[k-1]

sum = 0
for i in b:
   sum += i

print('%i %i %i' % (min,Max,sum))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

k = input()
a = map(int,raw_input().split())

b = sorted(a)

min = b[0]
Max = b[k-1]

sum = 0
for i in b:
   sum += i

print('%i %i %i' % (min,Max,sum)



Fixed submission:
# -*- coding: utf-8

k = input()
a = map(int,raw_input().split())

b = sorted(a)

min = b[0]
Max = b[k-1]

sum = 0
for i in b:
   sum += i

print('%i %i %i' % (min,Max,sum))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   if map(int,raw_input().split()) == [0,0]:
      break
   else:
      A = map(int,raw_input().split())
      for i in range(A[0]):
         print('#'*A[1])
         print('\n')



Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   if map(int,raw_input().split()) == [0,0]:
      break
   A = map(int,raw_input().split())
   for i in range(A[0]):
      print('#'*A[1])
      print('\n')



Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   if map(int,raw_input().split()) == [0,0]:
      break

   a = map(int,raw_input().split())
   for i in range(a[0]):
      print('#'*a[1])
      print('\n')



Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   if map(int,raw_input().split()) == [0,0]:
      break

   a = map(int,raw_input().split())
   for i in range(a[0]):
      print('#'*a[1])
      print(i)



Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   if raw_input() == '0 0':
      break

   a = map(int,raw_input().split())
   for i in range(a[0]):
      print('#'*a[1])
      print(i)



Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
    print('')




Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')
Buggy python submission (verdict: Runtime Error):
 # -*-coding: utf-8

while True:
   a = map(int,raw_input().split())
   
   print('#'*a[1])
   for i in range(a[0]-2):
      b = a[1]-2
      print('#''*'*b'#')
   print('#'*a[1])


Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   print('#'*a[1])
   for i in range(a[0]-2):
      b ='.'*(a[1]-2)
      print('#'+b+'#')
   print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
 # -*-coding: utf-8

while True:
   a = map(int,raw_input().split())
   print('#'*a[1])
   for i in range(a[0]-2):
      b = a[1]-2
      print('#''*'*b'#')
   print('#'*a[1])
   if a == [0,0]
      break


Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   print('#'*a[1])
   for i in range(a[0]-2):
      b ='.'*(a[1]-2)
      print('#'+b+'#')
   print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   print('#'*a[1])
   for i in range(a[0]-2):
      b = a[1]-2
      print('#''*'*b'#')
   print('#'*a[1])
   if a == [0,0]
      break


Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   print('#'*a[1])
   for i in range(a[0]-2):
      b ='.'*(a[1]-2)
      print('#'+b+'#')
   print('#'*a[1])
   print('')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   print('#'*a[1])
   for i in range(a[0]-2):
      b = a[1]-2
      print('#''*'*b'#')
   print('#'*a[1])
   if a == [0,0]:
      break


Fixed submission:
# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   print('#'*a[1])
   for i in range(a[0]-2):
      b ='.'*(a[1]-2)
      print('#'+b+'#')
   print('#'*a[1])
   print('')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8

while True:
   a = list(map(int,input().split()))
   if a == [0,0]:
      break
   if a[1] % 2 == 0:
      b1 = "#."*int(a[1]/2)
      b2 = ".#"*int(a[1]/2)
   if a[1] % 2 == 1:
      b1 = "#."*int((a[1]-1)/2)+"#"
      b2 = ".#"*int((a[1]-1)/2)+"."
   
   if a[0] %2 == 0:
      for i in range(a[0]/2):
         print(b1)
         print(b2)
   if a[0] %2 == 1:
      for i in range((a[0]-1)/2):
         print(b1)
         print(b2)
      print(b1)
   print("")



Fixed submission:
# -*- coding: utf-8

while True:
   a = list(map(int,input().split()))
   if a == [0,0]:
      break
   if a[1] % 2 == 0:
      b1 = "#."*int(a[1]/2)
      b2 = ".#"*int(a[1]/2)
   if a[1] % 2 == 1:
      b1 = "#."*int((a[1]-1)/2)+"#"
      b2 = ".#"*int((a[1]-1)/2)+"."
   
   if a[0] %2 == 0:
      for i in range(int(a[0]/2)):
         print(b1)
         print(b2)
   if a[0] %2 == 1:
      for i in range(int((a[0]-1)/2)):
         print(b1)
         print(b2)
      print(b1)
   print("")