Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import random
class Dice:
    def __init__(self, top, front, right, left, back, bottom):
        self.top,   self.bottom = top, bottom
        self.right, self.left   = right, left
        self.front, self.back   = front, back

    def rot(self, d):
        if   d == "N":
            ((self.top, self.back, self.bottom, self.front) =
             (self.front, self.top, self.back, self.bottom))
        elif d == "S":
            ((self.top, self.back, self.bottom, self.front) =
             (self.back, self.bottom, self.front, self.top))
        elif d == "E":
            ((self.top, self.right, self.bottom, self.left) =
             (self.left, self.top, self.right, self.bottom))
        elif d == "W":
            ((self.top, self.right, self.bottom, self.left) =
             (self.right, self.bottom, self.left, self.top))

def same(a, b):
    if ((a.top, a.bottom, a.right, a.left, a.front, a.back) ==
        (b.top, b.bottom, b.right, b.left, b.front, b.back)):
        return True
    else:
        return False

ref = {}
ls1 = map(int, raw_input().split())
ls2 = map(int, raw_input().split())
dice1 = Dice(ls1[0], ls1[1], ls1[2], ls1[3], ls1[4], ls1[5])
dice2 = Dice(ls2[0], ls2[1], ls2[2], ls2[3], ls2[4], ls2[5])
for i in xrange(1000):
    d = "NSEW"[random.randint(0,3)]
    dice1.rot(d)
    if same(dice1, dice2):
        print "Yes"
        break
else:
    print "No"

Fixed submission:
import random
class Dice:
    def __init__(self, top, front, right, left, back, bottom):
        self.top,   self.bottom = top, bottom
        self.right, self.left   = right, left
        self.front, self.back   = front, back

    def rot(self, d):
        if   d == "N":
            (self.top, self.back, self.bottom, self.front) = (
             self.front, self.top, self.back, self.bottom)
        elif d == "S":
            (self.top, self.back, self.bottom, self.front) = (
             self.back, self.bottom, self.front, self.top)
        elif d == "E":
            (self.top, self.right, self.bottom, self.left) = (
             self.left, self.top, self.right, self.bottom)
        elif d == "W":
            (self.top, self.right, self.bottom, self.left) = (
             self.right, self.bottom, self.left, self.top)

def same(a, b):
    if ((a.top, a.bottom, a.right, a.left, a.front, a.back) ==
        (b.top, b.bottom, b.right, b.left, b.front, b.back)):
        return True
    else:
        return False

ref = {}
ls1 = map(int, raw_input().split())
ls2 = map(int, raw_input().split())
dice1 = Dice(ls1[0], ls1[1], ls1[2], ls1[3], ls1[4], ls1[5])
dice2 = Dice(ls2[0], ls2[1], ls2[2], ls2[3], ls2[4], ls2[5])
for i in xrange(1000):
    d = "NSEW"[random.randint(0,3)]
    dice1.rot(d)
    if same(dice1, dice2):
        print "Yes"
        break
else:
    print "No"
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"
else
   print "a == b"
end

Fixed submission:
a,b=map(int, raw_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, raw_input().split())
if a > b:
   print "a > b"
elif a < b:
   print "a < b"
else
   print "a == b"

Fixed submission:
a,b=map(int, raw_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, raw_input().split())

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

Fixed submission:
a,b=map(int, raw_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 = gets.chomp.split(" ").to_i
if a < b
    puts "a < b"
elif a > b
    puts "a > b"
else
    puts "a == b"

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

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

Buggy python submission (verdict: Runtime Error):
File Edit Options Buffers Tools Help
a, b = gets.chomp.split(" ").to_i
if a < b
    puts "a < b"
elsif a > b
    puts "a > b"
else
    puts "a == b"
end

Fixed submission:
a,b=map(int, raw_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 = gets.chomp.split(" ").to_i
if a < b
    puts "a < b"
elsif a > b
    puts "a > b"
else
    puts "a == b"
end

Fixed submission:
a,b=map(int, raw_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 = gets.chomp.split(" ")
a.to_i;	b.to_i
if a < b
    puts "a < b"
elsif a > b
    puts "a > b"
else
    puts "a == b"
end

Fixed submission:
a,b=map(int, raw_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 = gets.chomp.split(" ")
a = a.to_i
b = b.to_i
if a < b
    puts "a < b"
elsif a > b
    puts "a > b"
else
    puts "a == b"
end

Fixed submission:
a,b=map(int, raw_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 = gets.split(" ")
a = a.to_i
b = b.to_i
if a < b
    puts "a < b"
elsif a > b
    puts "a > b"
else
    puts "a == b"
end

Fixed submission:
a,b=map(int, raw_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,c = map(int, raw_input().split())

if a < b:
    if b < c:
        print "Yes"\n
else:
    print "No"\n

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

if (a < b and b < c):
    print 'Yes'
else:
    print 'No'

Buggy python submission (verdict: Runtime Error):
a, b, c = gets.split(" ")
a, b, c = a.to_i, b.to_i, c.to_i
if a < b && b < c
    puts "YES"
else
    puts "NO"
end

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

if (a < b and b < c):
    print 'Yes'
else:
    print 'No'

Buggy python submission (verdict: Runtime Error):
a, b, c = gets.split(" ")
a, b, c = a.to_i, b.to_i, c.to_i
if a < b && b < c
    puts "YES"
else
    puts "NO"
end

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

if (a < b and b < c):
    print 'Yes'
else:
    print 'No'

Buggy python submission (verdict: Runtime Error):
a, b, c = gets.chomp.split(" ")
a, b, c = a.to_i, b.to_i, c.to_i
if a < b && b < c
    puts "YES"
else
    puts "NO"
end

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

if (a < b and b < c):
    print 'Yes'
else:
    print 'No'

Buggy python submission (verdict: Runtime Error):
a, b, c = gets.chomp.split(" ")
a, b, c = a.to_i, b.to_i, c.to_i
if a < b && b < c
    puts "YES"
else
    puts "NO"
end

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

if (a < b and b < c):
    print 'Yes'
else:
    print 'No'
Buggy python submission (verdict: Runtime Error):
a[0],a[1],a[2] = map(int, raw_input().split())

i = 1
while i < 3 :
    j = i - 1
    while j < 3:
        if a[j] > a[j+1]:
             t = a[j]
             a[j] = a[j+1]
             a[j+1] = t
        else:
            break
        j -= 1
    i += 1

print a[0],a[1],a[2]

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

Buggy python submission (verdict: Runtime Error):
a[0],a[1],a[2] = map(int, raw_input().split())

i = 1
while i < 3 :
    j = i - 1
    while j > 0:
        if a[j] > a[j+1]:
             t = a[j]
             a[j] = a[j+1]
             a[j+1] = t
        else:
            break
        j -= 1
    i += 1

print a[0],a[1],a[2]

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

Buggy python submission (verdict: Runtime Error):
a[0],a[1],a[2] = map(int, raw_input().split())

i = 1
while i < 3 :
    j = i - 1
    while j >= 0:
        if a[j] > a[j+1]:
             t = a[j]
             a[j] = a[j+1]
             a[j+1] = t
        else:
            break
        j -= 1
    i += 1

print a[0],a[1],a[2]

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

Buggy python submission (verdict: Runtime Error):
a[0],a[1],a[2] = map(int, raw_input().split())

sorted(a)

print a[0],a[1],a[2]

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

Buggy python submission (verdict: Runtime Error):
a[0],a[1],a[2] = map(int, raw_input().split())


print a[0],a[1],a[2]

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

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, raw_input().split())
aa = [1, 2, 3]

sorted(aa)

print aa[0],aa[1],aa[2]\n

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

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, raw_input().split())
aa[0] = a
aa[1] = b
aa[2] = c

sorted(aa)

print aa[0],aa[1],aa[2]

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

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

aa = [,,,]
aa[0] = a
aa[1] = b
aa[2] = c

sorted(aa)

print aa[0],aa[1],aa[2]

Fixed submission:
a,b,c = sorted(map(int, raw_input().split()))
print a,b,c
Buggy python submission (verdict: Runtime Error):
from __future__ import division, print_function
from sys import stdin

for line in stdin:
    a,b = map(int, raw_input().split())
    
    if (a == 0 and b == 0):
        break

    if a > b:
       print b, a
    else:
       print a, b

Fixed submission:
while True:
    line = map(int, raw_input().split())
    if line[0] == 0 and line[1] == 0:
        break
    line.sort()
    print line[0],line[1]

Buggy python submission (verdict: Runtime Error):
from __future__ import division, print_function
from sys import stdin

for line in stdin:
    a,b = map(int, line.split())
    if (a == 0 and b == 0):
        break
    if a > b:
       print b, a
    else:
       print a, b

Fixed submission:
while True:
    line = map(int, raw_input().split())
    if line[0] == 0 and line[1] == 0:
        break
    line.sort()
    print line[0],line[1]
Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())

print a/b, a % b, real(a)/real(b)

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

print("%d %d %f" % (a//b, a % b, a/float(b)))

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

print ("%d %d %f" %(a//b,a % b,a/float(b))

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

print("%d %d %f" % (a//b, a % b, a/float(b)))
Buggy python submission (verdict: Runtime Error):
a = map(int, raw_input().spli())

Pi = 3.141592658979

print a**2*Pi, 2*a*Pi

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

Buggy python submission (verdict: Runtime Error):
a = map(float, raw_input().spli())

Pi = 3.141592658979

print a**2*Pi, 2*a*Pi

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

Buggy python submission (verdict: Runtime Error):
a = map(float, raw_input().spli())

Pi = 3.141592658979

print a*a*Pi, 2*a*Pi

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

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

Pi = 3.141592658979

print a*a*Pi, 2*a*Pi

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

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

Pi = 3.141592658979

print("%f %f" % (a*a*Pi, 2*a*Pi))

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

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

Pi = 3.141592658979

print("%f %f" % (a*a*Pi, 2*a*Pi))

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

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

Pi = 3.141592658979

print("%f %f" % (a*a*Pi, 2*a*Pi))

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

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

Pi = 3.141592658979

print("%f %f" % (a*a*Pi, 2*a*Pi))

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))

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

Pi = float(3.141592658979)

print("%f %f" % (a*a*Pi, 2*a*Pi))

Fixed submission:
import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))
Buggy python submission (verdict: Runtime Error):
while true:
    a = input()
    if a[1] == "?":
        break
    if a[1] == "+":
        print a[0]+a[2]
    elif a[1] == "-":
        print a[0]-a[2]
    elif a[1] == "*":
        print a[0]*a[2]
    elif a[1] == "/":
        print a[0]/a[2]

Fixed submission:
while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        break
    elif op == "+":
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b

Buggy python submission (verdict: Runtime Error):
while true:
    a, op, b = raw_input().split
    if op == "?":
        break
    if op == "+":
        print a+b
    elif op == "-":
        print a-b
    elif op == "*":
        print a*b
    elif op == "/":
        print a/b

Fixed submission:
while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        break
    elif op == "+":
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b

Buggy python submission (verdict: Runtime Error):
while True:
    a, op, b = raw_input().split
    if op == "?":
        break
    if op == "+":
        print a+b
    elif op == "-":
        print a-b
    elif op == "*":
        print a*b
    elif op == "/":
        print a/b

Fixed submission:
while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        break
    elif op == "+":
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b
Buggy python submission (verdict: Runtime Error):
while True:
    h, w = map(int, raw_input().split())

    if h == 0 and w == 0:
        break
    
    hcnt = 1
    for i in range(0, h):
        wid = ""
        if hcnt == 1 or hcnt == h:
            for j in range(0, w):
                 wid += "#"
             print wid
        else:
            wid += "#"
            for j in range(1, w-1):
                 wid += "."
            wid += "#"
            print wid
       hcnt += 1

Fixed submission:
while True:
    h, w = map(int, raw_input().split())

    if h == 0 and w == 0:
        break
    
    hcnt = 1
    for i in range(0, h):
        wid = ""
        if hcnt == 1 or hcnt == h:
            for j in range(0, w):
                wid += "#"
            print wid
        else:
            wid += "#"
            for j in range(1, w-1):
                wid += "."
            wid += "#"
            print wid
        hcnt += 1
    print ""

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

    if h == 0 and w == 0:
        break
    
    hcnt = 1
    for i in range(0, h):
        wid = ""
        if hcnt == 1 or hcnt == h:
            for j in range(0, w):
                 wid += "#"
             print wid
        else:
            wid += "#"
            for j in range(1, w-1):
                 wid += "."
            wid += "#"
            print wid
        hcnt += 1

Fixed submission:
while True:
    h, w = map(int, raw_input().split())

    if h == 0 and w == 0:
        break
    
    hcnt = 1
    for i in range(0, h):
        wid = ""
        if hcnt == 1 or hcnt == h:
            for j in range(0, w):
                wid += "#"
            print wid
        else:
            wid += "#"
            for j in range(1, w-1):
                wid += "."
            wid += "#"
            print wid
        hcnt += 1
    print ""
Buggy python submission (verdict: Runtime Error):
input()
a = map(int, raw_input().split())

for i in range(a.length(), 1):
    print a[i-1],

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

a.reverse()
print(" ".join(map(str, a)))

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

for i in range(length(a), 1):
    print a[i-1],

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

a.reverse()
print(" ".join(map(str, a)))

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

a.reverse()
for i in range(0, a.len()-1):
    print a[i],

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

a.reverse()
print(" ".join(map(str, a)))

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

a.reverse()
prnt = ""
for i in range(0, r-2):
    prnt += a[i]
    prnt += " "

prnt += a[r-1]
print prnt

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

a.reverse()
print(" ".join(map(str, a)))
Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = map(int, raw_input().split())
    if m+f+r == -3:
        break

    if m == -1 or f == -1:
        print "F"
    elif m+f >= 80:
        print "A"
    elif m+f >= 65:
        print "B"
    elif m+f >= 50:
        print "C"
    elif m+f >= 30
        if r >= 50:
            print "C"
        else:
            print "D"
    else:
        print "F"

Fixed submission:
while True:
    m, f, r = map(int, raw_input().split())
    if m+f+r == -3:
        break

    if m == -1 or f == -1:
        print "F"
    elif m+f >= 80:
        print "A"
    elif m+f >= 65:
        print "B"
    elif m+f >= 50:
        print "C"
    elif m+f >= 30:
        if r >= 50:
            print "C"
        else:
            print "D"
    else:
        print "F"
Buggy python submission (verdict: Runtime Error):
while True:
    n, x = map(int, raw_input().split())
    if n == 0 and x == 0:
        break

    count = 0
    for i in range(1, n-2):
        for j in range(i, n-1):
            k in range(j, n):
                if i+j+k == n:
                    count += 1
    print count

Fixed submission:
while True:
    n, x = map(int, raw_input().split())
    if n == 0 and x == 0:
        break

    count = 0
    for i in range(1, n-1):
        for j in range(i+1, n):
            for k in range(j+1, n+1):
                if i+j+k == x:
                    count += 1
    print count

Buggy python submission (verdict: Runtime Error):
while True:
    n, x = map(int, raw_input().split())
    if n == 0 and x == 0:
        break

    count = 0
    for i in range(1, n-2):
        for j in range(i, n-1):
            k in range(j, n):
                if i+j+k == x:
                    count += 1
    print count

Fixed submission:
while True:
    n, x = map(int, raw_input().split())
    if n == 0 and x == 0:
        break

    count = 0
    for i in range(1, n-1):
        for j in range(i+1, n):
            for k in range(j+1, n+1):
                if i+j+k == x:
                    count += 1
    print count
Buggy python submission (verdict: Runtime Error):
x = input()

print x.upper()

Fixed submission:
z = ""
for x in raw_input():
    if x.islower():
        z += x.upper()
    else:
        z += x.lower()

print z

Buggy python submission (verdict: Runtime Error):

for x in raw_input():
    if x.islower():
        print x.upper()
    elif x.isupper()
        print x.lower()

Fixed submission:
z = ""
for x in raw_input():
    if x.islower():
        z += x.upper()
    else:
        z += x.lower()

print z

Buggy python submission (verdict: Runtime Error):
z = ""
for x in raw_input():
    if x.islower():
        z += x.upper()
    else:
        z += x.lower(),

print z

Fixed submission:
z = ""
for x in raw_input():
    if x.islower():
        z += x.upper()
    else:
        z += x.lower()

print z
Buggy python submission (verdict: Runtime Error):
while True:
    x = int(input())
    if x == 0:
        break
    sum = 0
    for i in range(len(x))
        sum += x[i]
    print sum

Fixed submission:
while True:
    x = str(raw_input())
    if int(x) == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += int(x[i])
    print sum

Buggy python submission (verdict: Runtime Error):
while True:
    x = int(input())
    if x == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += x[i]
    print sum

Fixed submission:
while True:
    x = str(raw_input())
    if int(x) == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += int(x[i])
    print sum

Buggy python submission (verdict: Runtime Error):
while True:
    x = int(raw_input())
    if x == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += x[i]
    print sum

Fixed submission:
while True:
    x = str(raw_input())
    if int(x) == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += int(x[i])
    print sum

Buggy python submission (verdict: Runtime Error):
while True:
    x = str(raw_input())
    if x == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += int(x[i])
    print sum

Fixed submission:
while True:
    x = str(raw_input())
    if int(x) == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += int(x[i])
    print sum

Buggy python submission (verdict: Runtime Error):
while True:
    x = int(raw_input())
    if x == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += x[i]
    print sum

Fixed submission:
while True:
    x = str(raw_input())
    if int(x) == 0:
        break
    sum = 0
    for i in range(len(x)):
        sum += int(x[i])
    print sum
Buggy python submission (verdict: Runtime Error):
w = raw_input()

sum = 0
while True:
    t = raw_input()
    if t == "END_OF_TEXT":
        break
    elif t == w
        sum += 1

print sum

Fixed submission:
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t[0] == "END_OF_TEXT":
        break
    else:
        for ti in t:
            if ti.lower() == w:
                sum += 1
print sum

Buggy python submission (verdict: Runtime Error):
w = raw_input().lower
sum = 0
while True:
    t = raw_input().lower
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.count(w)
print sum

Fixed submission:
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t[0] == "END_OF_TEXT":
        break
    else:
        for ti in t:
            if ti.lower() == w:
                sum += 1
print sum

Buggy python submission (verdict: Runtime Error):
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().lower()
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.count(w)
print sum

Fixed submission:
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t[0] == "END_OF_TEXT":
        break
    else:
        for ti in t:
            if ti.lower() == w:
                sum += 1
print sum

Buggy python submission (verdict: Runtime Error):
w = raw_input().lower()
sum = 0
while True:
    t = map(str, raw_input().split())
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.lower().count(w)
print sum

Fixed submission:
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t[0] == "END_OF_TEXT":
        break
    else:
        for ti in t:
            if ti.lower() == w:
                sum += 1
print sum

Buggy python submission (verdict: Runtime Error):
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.lower().count(w)
print sum

Fixed submission:
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t[0] == "END_OF_TEXT":
        break
    else:
        for ti in t:
            if ti.lower() == w:
                sum += 1
print sum