Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    else:
        j = 0
        while True:
            if T[j] != H[j]:
                if ord(T[j]) > ord(H[j]):
                    tScore += 3
                else:
                    hScore += 3
                break
            j += 1
print("%d %d" % (tScore, hScore))

Fixed submission:
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    elif T > H:
        tScore += 3
    elif H > T:
        hScore +=3
print("%d %d" % (tScore, hScore))

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    else:
        j = 0
        while True:
            if T in H or H in T:
                if len(T) > len(H)
                    hScore += 3
                else:
                    tScores +=3
            if T[j] != H[j]:
                if ord(T[j]) > ord(H[j]):
                    tScore += 3
                else:
                    hScore += 3
                break
            j += 1
print("%d %d" % (tScore, hScore))

Fixed submission:
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    elif T > H:
        tScore += 3
    elif H > T:
        hScore +=3
print("%d %d" % (tScore, hScore))

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    else:
        j = 0
        while True:
            if T in H or H in T:
                if len(T) > len(H)
                    hScore += 3
                else:
                    tScores +=3
                break
            if T[j] != H[j]:
                if ord(T[j]) > ord(H[j]):
                    tScore += 3
                else:
                    hScore += 3
                break
            j += 1
print("%d %d" % (tScore, hScore))

Fixed submission:
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    elif T > H:
        tScore += 3
    elif H > T:
        hScore +=3
print("%d %d" % (tScore, hScore))

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    else:
        j = 0
        while True:
            if T in H or H in T:
                if len(T) > len(H):
                    hScore += 3
                else:
                    tScores +=3
                break
            if T[j] != H[j]:
                if ord(T[j]) > ord(H[j]):
                    tScore += 3
                else:
                    hScore += 3
                break
            j += 1
print("%d %d" % (tScore, hScore))

Fixed submission:
#!/usr/bin/env python

n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    elif T > H:
        tScore += 3
    elif H > T:
        hScore +=3
print("%d %d" % (tScore, hScore))