Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
count = 1

while True:
       x = int(input())
       if x != 0:
           print("Case {0}: {1}".format(count, x)
           count += 1
       else:
           break

Fixed submission:
count = 1

while True:
       x = int(input())
       if x != 0:
           print("Case {0}: {1}".format(count, x))
           count += 1
       else:
           break

Buggy python submission (verdict: Runtime Error):
count = 1

while True:
       x = int(input())
       if x != 0:
           print("Case {0} : {1}".format(count, x)
           count += 1
       else:
           break

Fixed submission:
count = 1

while True:
       x = int(input())
       if x != 0:
           print("Case {0}: {1}".format(count, x))
           count += 1
       else:
           break

Buggy python submission (verdict: Runtime Error):
count = 1

while True:
       x = int(input())
       if x != 0:
           print("Case {0} : {1}".format(count, x)
           count += 1
       else:
           break

Fixed submission:
count = 1

while True:
       x = int(input())
       if x != 0:
           print("Case {0}: {1}".format(count, x))
           count += 1
       else:
           break
Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i input().split()]

total = 0
for a in range(a, b+1)
      if c % a == 0:
         total += 1
      
print(total)

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

total = 0
for d in range(a, b+1):
      if c % d == 0:
         total += 1
      
print(total)

Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i input().split()]

total = 0
for d in range(a, b+1)
      if c % d == 0:
         total += 1
      
print(total)

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

total = 0
for d in range(a, b+1):
      if c % d == 0:
         total += 1
      
print(total)

Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]

total = 0
for d in range(a, b+1)
      if c % d == 0:
         total += 1
      
print(total)

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

total = 0
for d in range(a, b+1):
      if c % d == 0:
         total += 1
      
print(total)
Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in input().split()]

d = a // b
r = a % b
f = a / b

print("{0} {1} {2:.5f}".format(d, r, f))

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

d = a // b
r = a % b
f = a / b

print("{0} {1} {2:.5f}".format(d, r, f))
Buggy python submission (verdict: Runtime Error):
while True:
   H, W = [int(i) for i in input().split()]
   if H == W == 0:
      break
   
   
   for a in  
for h  in range(H):
      for h in range(W):
         if h == 0  or h == H - 1 or w == 0 or w == W -1:
           print('#', end='')
         else:
           print('.', end='')
 
      print()
    
   print()

Fixed submission:
while True:
   H, W = [int(i) for i in input().split()]
   if H == W == 0:
      break
   
   for h  in range(H):
      for w in range(W):
         if h == 0  or h == H - 1 or w == 0 or w == W -1:
           print('#', end='')
         else:
           print('.', end='')
 
      print()
    
   print()
Buggy python submission (verdict: Runtime Error):
while True:
    
    H, W = [int(i) for i in input().split()]
        
    for a in range(H):
        for b in range(W):
             if a % 2 == 0 or b % 2 == 0:
                  print('#', end='')
             else:
                  print('.', end='')
        print()
    print()
         

Fixed submission:
while True:
    
    H, W = [int(i) for i in input().split()]
    if H == W == 0:
        break    
    for a in range(H):
        for b in range(W):
             if (a + b) % 2 == 0:
                  print('#', end='')
             else:
                  print('.', end='')
        print()
    print()
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) 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)

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) 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()
    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) 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)

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):
n, m = [int(i) for i in input().split()

matrix = []
for ni in range(n):
   matrix.append([int(a) for a in input().split()])
   
vector = []
for mi in range(m):
    vector.append(int(input()))

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
       sum += matrix[ni][mi] * vector[mi]
    print(sum)

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

matrix = []
for ni in range(n):
   matrix.append([int(a) for a in input().split()])
   
vector = []
for mi in range(m):
    vector.append(int(input()))

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
       sum += matrix[ni][mi] * vector[mi]
    
    print(sum)

Buggy python submission (verdict: Runtime Error):
n, m = [int(i) for i in input().split()

matrix = []
for ni in range(n):
   matrix.append([int(a) for a in input().split()])
   
vector = []
for mi in range(m):
    vector.append(int(input()))

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
       sum += matrix[ni][mi] * vector[mi]
    
    print(sum)

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

matrix = []
for ni in range(n):
   matrix.append([int(a) for a in input().split()])
   
vector = []
for mi in range(m):
    vector.append(int(input()))

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
       sum += matrix[ni][mi] * vector[mi]
    
    print(sum)
Buggy python submission (verdict: Runtime Error):
while True:
   m, f, r = [int(i) for i in input().split()]
 
   if m == f == r == -1:
      break
   elif m or f == -1:
      return F
   
   elif m + f >= 80:
      return A
   elif 65 <= m +f < 80:
      return B
   elif 50 <= m+f < 65:
      return C
   elif 30 <= m+f < 50:
      if r >= 50:
        return C
      else:
        return D
   else:
      return F

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):
while True:
   m, f, r = [int(i) for i in input().split()]
 
   if m == f == r == -1:
      break
   elif m or f == -1:
      return F
   
   elif m + f >= 80:
      print("A")
   elif 65 <= m+f < 80:
      print("B")
   elif 50 <= m+f < 65:
      print("C")
   elif 30 <= m+f < 50:
      if r >= 50:
        print("C")
      else:
        print("D")
   else:
      print("F")

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):
while True:
   m, f, r = [int(i) for i in input().split()]
 
   if m == f == r == -1:
      break
   elif m or f == -1:
      return F
   
   elif m + f >= 80:
      print("A")
   elif 65 <= m+f < 80:
      print("B")
   elif 50 <= m+f < 65:
      print("C")
   elif 30 <= m+f < 50:
      if r >= 50:
        print("C")
      else:
        print("D")
   elif m+f < 30:
      print("F")

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 s 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):
while True:
    a = 0
    data = input()
    if data == 0:
        break
    a += data
print(a)

Fixed submission:
while True:
    data = input()
    if data == '0':
        break
 
    print(sum([int(i) for i in data]))
Buggy python submission (verdict: Runtime Error):
s = print()
p = print()

s *= 2
if s.find(p) ! = =1:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input()
p = input()

s *= 2
if s.find(p) != -1:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
s = print()
p = print()

s *= 2
if s.find(p) ! = -1:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input()
p = input()

s *= 2
if s.find(p) != -1:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
s = print()
p = print()

s *= 2
if s.find(p) != -1:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input()
p = input()

s *= 2
if s.find(p) != -1:
    print("Yes")
else:
    print("No")
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):
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):
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):
s = input()
q = input()

for qi in range(q):
    command = input().split()
    a = int(command[1])
    b = int(command[2])
    if command[0] == 'print':
        print(s[a:b + 1])
    elif command[0] == 'reverse':
        s = s[:a] + s[a:b + 1][::-1] + s[b + 1:]
    else:
        p = command[3]
        s = s[:a] + p + s[b + 1:]

Fixed submission:
s = input()
q = int(input())

for qi in range(q):
    command = input().split()
    a = int(command[1])
    b = int(command[2])
    if command[0] == 'print':
        print(s[a:b + 1])
    elif command[0] == 'reverse':
        s = s[:a] + s[a:b + 1][::-1] + s[b + 1:]
    else:
        p = command[3]
        s = s[:a] + p + s[b + 1:]
Buggy python submission (verdict: Runtime Error):
x = input()

x3 = x * x * x

print(x3)

Fixed submission:
x = int(input())

x3 = x ** 3

print(x3)

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

x3 = x * x * x

print(x3)

Fixed submission:
x = int(input())

x3 = x ** 3

print(x3)

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

x3 = x * x * x

print(x3)

Fixed submission:
x = int(input())

x3 = x ** 3

print(x3)

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

x3 = x * x * x

print(x3)

Fixed submission:
x = int(input())

x3 = x ** 3

print(x3)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

area = a * b
ci = 2 * a + 2 * b

print(area)
print(ci)

Fixed submission:
a, b = map(int,input().split())

print(a * b,(a + b) * 2)
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().spilt())

if a < b:
    print(a + "<" + b)
elif a > b:
    print(a + ">" + b)
elif a == b:
    print(a + "==" + b)

Fixed submission:
a, b = map(int,input().split())

if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().spilt())

if a < b:
    print("a > b")
elif a > b:
    print("a < b")
else a == b:
    print("a == b")

Fixed submission:
a, b = map(int,input().split())

if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().spilt())

if a < b:
    print("a > b")
elif a > b:
    print("a < b")
else a == b:
    print("a == b")

Fixed submission:
a, b = map(int,input().split())

if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")

Buggy python submission (verdict: Runtime Error):
1 = list(map(int, input().split()))
if l[0] == l[1]:
????????print("a == b")
elif l[0]<l[1]:
????????print("a < b")
else:
????????print("a > b")

Fixed submission:
a, b = map(int,input().split())

if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().spilt())

if a < b:
    print("a > b")
elif a > b:
    print("a < b")
else a == b:
    print("a == b")

Fixed submission:
a, b = map(int,input().split())

if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
from math import pi
r=float(raw_input)

print ("{0:6f}{1:6f}").format(r*r*pi, 2*r*pi)

Fixed submission:
from math import pi
r=float(raw_input())
print ("{0:.6f} {1:6f}").format(r*r*pi,2*r*pi)

Buggy python submission (verdict: Runtime Error):
from math import pi
r=float(raw_input)

print ("{0:6f}{1:6f}").format(r*r*pi,2*r*pi)

Fixed submission:
from math import pi
r=float(raw_input())
print ("{0:.6f} {1:6f}").format(r*r*pi,2*r*pi)
Buggy python submission (verdict: Runtime Error):
x,y = map (raw_input().split())
print = 2*x, 2*y

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
x,y = map (raw_input().split())
print x*y, 2*x+2*y

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
x,y = map (int raw_input().split())
print x*y, 2*x+2*y

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

print = (a *  b), (a*2 + b*2)

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

print = (a *  b),(a*2 + b*2)

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

print = (a *  b)(a*2 + b*2)

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

print = (a * b)(a*2 + b*2)

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
n = map(int,raw_input().split())
for i in n
print i,

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
n = map(int,raw_input().split())
for i in n
    print i,

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
n = map(int,raw_input().split())
n.sort()
for i in n:
print i,

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a,b  = int(raw_input().split())
print a * b, (a*2) + (b*2)

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a,b = int(raw_input().split())
print a*b,a*2+b*2

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a,b = int(raw_input().split())
print (a*b),(a*2+b*2)

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)

Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
print ("[0] [1}").format(a*b,2*a+2*b)

Fixed submission:
a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)
Buggy python submission (verdict: Runtime Error):
a,b = map (int, raw_input().split())
if a > b
print "a > b"
if a < b
print "a < b"
if a == b
print "a=b"

Fixed submission:
a,b = map(int,raw_input().split())

if a < b:
    print ("a < b")
elif a > b:
    print ("a > b")
elif a == b:
    print ("a == b")

Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())

if a > b:
    print "a > b"
if a < b:
    print "a < b"

a==b:
    print "a == b"

Fixed submission:
a,b = map(int,raw_input().split())

if a < b:
    print ("a < b")
elif a > b:
    print ("a > b")
elif a == b:
    print ("a == b")

Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())

if a > b:
    print "a > b"
if a < b:
    print "a < b"
a==b:
    print "a == b"

Fixed submission:
a,b = map(int,raw_input().split())

if a < b:
    print ("a < b")
elif a > b:
    print ("a > b")
elif a == b:
    print ("a == b")

Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
if a < b:
    print("a < b")
elif a>b:
    print("a > b")
elif a==b
    print("a == b")

Fixed submission:
a,b = map(int,raw_input().split())

if a < b:
    print ("a < b")
elif a > b:
    print ("a > b")
elif a == b:
    print ("a == b")

Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
if a < b:
    print("a < b")
elif a>b:
    print("a > b")
elif a==b
print("a == b")

Fixed submission:
a,b = map(int,raw_input().split())

if a < b:
    print ("a < b")
elif a > b:
    print ("a > b")
elif a == b:
    print ("a == b")
Buggy python submission (verdict: Runtime Error):
n = map(int,raw_input().split())
n.sort()
for i in n
    print i,

Fixed submission:
n = map(int,raw_input().split())
n.sort()
for i in n:
     print i,
Buggy python submission (verdict: Runtime Error):
for i in range(1000)
    print "Hello World"

Fixed submission:
for i in range(1000):
    print "Hello World"

Buggy python submission (verdict: Runtime Error):
for i in range(1000):
print "Hello World"

Fixed submission:
for i in range(1000):
    print "Hello World"
Buggy python submission (verdict: Runtime Error):
while 1:
    h,w = map(int, raw_input().split())

    if h == 0 nad w == 0:
    break

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

Fixed submission:
while(True):
    H, W = map(int, raw_input().split())
    if(H == 0 and W == 0):
        break
    for i in range(H):
        if(i == 0 or i == (H - 1)):
            print("#" * W)
        else:
            print("#" + "." * (W - 2) + "#")
    print("")

Buggy python submission (verdict: Runtime Error):
while 1:
    h,w = map(int, raw_input().split())

    if h == 0 and w == 0:
    break

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

Fixed submission:
while(True):
    H, W = map(int, raw_input().split())
    if(H == 0 and W == 0):
        break
    for i in range(H):
        if(i == 0 or i == (H - 1)):
            print("#" * W)
        else:
            print("#" + "." * (W - 2) + "#")
    print("")

Buggy python submission (verdict: Runtime Error):
while 1:
    h,w = map(int, raw_input().split())

    if h == 0 and w == 0:
    break

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

Fixed submission:
while(True):
    H, W = map(int, raw_input().split())
    if(H == 0 and W == 0):
        break
    for i in range(H):
        if(i == 0 or i == (H - 1)):
            print("#" * W)
        else:
            print("#" + "." * (W - 2) + "#")
    print("")

Buggy python submission (verdict: Runtime Error):
while 1:
    h,w = map(int, raw_input().split())

    if h == 0 and w == 0:
    break

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

Fixed submission:
while(True):
    H, W = map(int, raw_input().split())
    if(H == 0 and W == 0):
        break
    for i in range(H):
        if(i == 0 or i == (H - 1)):
            print("#" * W)
        else:
            print("#" + "." * (W - 2) + "#")
    print("")