Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def check_right_triangle(side1, side2, side3):
	if side1**2 == side2**2 + side3**2:
		return True
	if side2**2 == side3**2 + side1**2:
		return True
	if sides3**3 == side1**2 + side2**2:
		return True
	return False

for i in range(int(raw_input())):
	sides = map(int, raw_input().split())
	if check_right_triangle(sides[0], sides[1], sides[2]):
		print "YES"
	print "NO"

Fixed submission:
def check_right_triangle(side1, side2, side3):
	pow = 2
	if side1**pow == side2**pow + side3**pow:
		return True
	if side2**pow == side3**pow + side1**pow:
		return True
	if side3**pow == side1**pow + side2**pow:
		return True
	return False


def check():
	for i in range(int(raw_input())):
		sides = map(int, raw_input().split())
		if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO"



if __name__ == "__main__":
	check()
	# print check_right_triangle(4, 3, 5)
	# print check_right_triangle(4, 3, 6)
	# print check_right_triangle(8, 8, 8)
Buggy python submission (verdict: Runtime Error):
import math
map = map(int, raw_input().split())
r = map[0]
area = r*r*math.pi
length = 2*r*math.pi
print "%s %s"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Buggy python submission (verdict: Runtime Error):
import math
map = map(int, raw_input().split())
r = map[0]
area = r*r*math.pi
length = 2*r*math.pi
print "%f %f"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Buggy python submission (verdict: Runtime Error):
import math
map = map(int, raw_input().split())
r = map[0]
area = r*r*math.pi
length = 2*r*math.pi
print "%f %f"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Buggy python submission (verdict: Runtime Error):
import math
maped = map(int, raw_input().split())
r = maped[0]
area = r*r*math.pi
length = 2*r*math.pi
print "%f %f"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Buggy python submission (verdict: Runtime Error):
maped = map(int, raw_input().split())
r = maped[0]
area = r*r*3.141592
length = 2*r*3.141592
print "%f %f"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Buggy python submission (verdict: Runtime Error):
from math import pi
maped = map(int, raw_input().split())
r = maped[0]
area = r*r*pi
length = 2*r*pi
print "%f %f"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Buggy python submission (verdict: Runtime Error):
from math import pi
maped = map(int, raw_input().split())
r = maped[0]
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Buggy python submission (verdict: Runtime Error):
from math import pi
r, = map(int, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)

Fixed submission:
from math import pi
r, = map(float, raw_input().split())
area = r**2*pi
length = 2*r*pi
print "%f %f"%(area, length)
Buggy python submission (verdict: Runtime Error):
print x^3

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

Buggy python submission (verdict: Runtime Error):
print str(x^3)

Fixed submission:
x = input()
print x**3
Buggy python submission (verdict: Runtime Error):
x = input().splite(" ")
print str(x[0]*x[1]) + " " + str(x[0]*2 + x[1]*2)

Fixed submission:
(x, y) = map(int, raw_input().split())
print x * y, 2 * (x + y)

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

Fixed submission:
(x, y) = map(int, raw_input().split())
print x * y, 2 * (x + y)

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

Fixed submission:
(x, y) = map(int, raw_input().split())
print x * y, 2 * (x + y)

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

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

def solve():
	a, b = map(int, raw_input().split())
	if a < b :
		return print "a < b"
	if a == b :
		return print "a == b"
	if a > b :
		return print "a > b"


if __name__ = "__main__"
	solve()

Fixed submission:
def solve():
	a, b = map(int, raw_input().split())
	if a < b :
		print "a < b"
	elif a == b :
		print "a == b"
	else:
		print "a > b"


if __name__ == "__main__":
	solve()

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


if __name__ = "__main__"
	solve()

Fixed submission:
def solve():
	a, b = map(int, raw_input().split())
	if a < b :
		print "a < b"
	elif a == b :
		print "a == b"
	else:
		print "a > b"


if __name__ == "__main__":
	solve()
Buggy python submission (verdict: Runtime Error):
ary = raw_input().split()
print sorted(ary, reverse=True).split

Fixed submission:
ary = raw_input().split()
sorted_ary = sorted(ary)

for num in sorted_ary:
    print num ,
Buggy python submission (verdict: Runtime Error):
i = 1
while 1:
	x = raw_input()
	if x == 0 break;
	print "Case %s: %s"%(i, x)
	i += 1

Fixed submission:
i = 1
while 1:
	x = raw_input()
	if x == str(0):
	 break;
	print "Case %s: %s"%(i, x)
	i += 1

Buggy python submission (verdict: Runtime Error):
i = 1
while 1:
	x = raw_input()
	if x == 0: break;
	print "Case %s: %s"%(i, x)
	i += 1

Fixed submission:
i = 1
while 1:
	x = raw_input()
	if x == str(0):
	 break;
	print "Case %s: %s"%(i, x)
	i += 1
Buggy python submission (verdict: Runtime Error):
ary = raw_input().split()
for line in ary:
	a, o, b = line.split()
	a = int(a)
	b = int(b)
	if o == "+":
		print a + b
	elif o == "-":
		print a - b
	elif o == "*":
		print a * b
	elif o == "/":
		print a / b

Fixed submission:

while 1:
	a, o, b = raw_input().split()
	a = int(a)
	b = int(b)
	if o == "+":
		print a + b
	elif o == "-":
		print a - b
	elif o == "*":
		print a * b
	elif o == "/":
		print a / b
	elif o == "?":
		break
Buggy python submission (verdict: Runtime Error):
while True:
	w, h = map(int, raw_input().split())
	if h == 0 and w == 0: break
	for y in range(0, h):
		for x in range(0, w):
			print "#",
		print 

Fixed submission:
n = raw_input()
arrry  = raw_input().split()
numList = reversed(arrry)
for n in numList:
	print n,
print

Buggy python submission (verdict: Runtime Error):
while True:
	w, h = map(int, raw_input().split())
	if h == 0 and w == 0: break
	for y in range(0, h):
		for x in range(0, w):
			print "#",
		print 
	print 

Fixed submission:
n = raw_input()
arrry  = raw_input().split()
numList = reversed(arrry)
for n in numList:
	print n,
print

Buggy python submission (verdict: Runtime Error):
while True:
	w, h = map(int, raw_input().split())
	if h == 0 and w == 0: break
	for y in range(0, h):
		out = ""
		for x in range(0, w):
			out += "#"
		print out
	print 

Fixed submission:
n = raw_input()
arrry  = raw_input().split()
numList = reversed(arrry)
for n in numList:
	print n,
print

Buggy python submission (verdict: Runtime Error):
while True:
	w, h = map(int, raw_input().split())
	if h == 0 and w == 0: break
	for y in range(h):
		out = ""
		for x in range(w):
			out += "#"
		print out
	print ""

Fixed submission:
n = raw_input()
arrry  = raw_input().split()
numList = reversed(arrry)
for n in numList:
	print n,
print

Buggy python submission (verdict: Runtime Error):
while True:
	w, h = map(int, raw_input().split())
	if [h,w] == [0, 0]: break
	for y in range(h):
		out = ""
		for x in range(w):
			out += "#"
		print out
	print ""

Fixed submission:
n = raw_input()
arrry  = raw_input().split()
numList = reversed(arrry)
for n in numList:
	print n,
print
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/python
# -*- coding: utf-8 -*-

def main():
    # input
    while(True):
        try:
            data = int(raw_input())
            print(countArea(data))
        except EOFError:
            break

def countArea(n):
    if n == 1:
        return 2
    else:
        return countArea(n-1) + n
        
if __name__=='__main__':
    main()

Fixed submission:
#! /usr/bin/python
# -*- coding: utf-8 -*-

def main():
    # input
    while(True):
        try:
            data = int(raw_input())
            print(countArea(data))
        except EOFError:
            break

def countArea(n):
    ans = 2
    while(n > 1):
        ans = ans + n
        n -= 1

    return ans

if __name__=='__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/python
# -*- coding: utf-8 -*-

MAX_Y = 8
MAX_X = 8

def main():
    # 入力
    N = int(raw_input())
    raw_input()

    for i , j in enumerate(range(N)):
        data = []
        for j in range(MAX_Y):
            input_list = map(int, raw_input())
            data.append(input_list)
        bomb_X = int(raw_input())
        bomb_Y = int(raw_input())
        raw_input()

        bomb_town = explosion(data, ((bomb_X-1, bomb_Y-1),))
        print("Data " + str(i+1) + ":")
        printBomb(bomb_town)

def printBomb(bomb):
    for x in bomb:
        print(reduce(lambda x, y: x+y, (map(str, x))))

# 盤面内か判定
def isIn(x, y):
    return 0<=x<MAX_X and 0<=y<MAX_Y

# 爆弾を爆破
def explosion(data, bomb):
    for b in bomb:
        if data[b[1]][b[0]] == 1:
            new_bomb = bom(data, b)
            burned_data = burned(data, b)
            data = explosion(burned_data, new_bomb)

    return data

# 燃やす
def burned(data, b):
    data[b[1]][b[0]] = 0
    return data

# 燃焼範囲をチェック
def bom(data, b):
    bom_area =  [(-3, 0), (-2, 0), (-1, 0), (1, 0), (2, 0), (3, 0),
                (0, -3), (0, -2), (0, -1), (0, 1), (0, 2), (0, 3)]
    new_bomb = []
    for x in bom_area:
        bomb = tuple([sum(x) for x in zip(x,b)])
        if isIn(*bomb):
            new_bomb.append(bomb)

    return new_bomb

if __name__=='__main__':
    main()

Fixed submission:
#! /usr/bin/python
# -*- coding: utf-8 -*-

MAX_Y = 8
MAX_X = 8

def main():
    # 入力
    N = int(raw_input())

    for i , j in enumerate(range(N)):
        raw_input()

        data = []
        for j in range(MAX_Y):
            input_list = map(int, raw_input())
            data.append(input_list)
        bomb_X = int(raw_input())
        bomb_Y = int(raw_input())

        bomb_town = explosion(data, ((bomb_X-1, bomb_Y-1),))
        print("Data " + str(i+1) + ":")
        printBomb(bomb_town)

def printBomb(bomb):
    for x in bomb:
        print(reduce(lambda x, y: x+y, (map(str, x))))

# 盤面内か判定
def isIn(x, y):
    return 0<=x<MAX_X and 0<=y<MAX_Y

# 爆弾を爆破
def explosion(data, bomb):
    for b in bomb:
        if data[b[1]][b[0]] == 1:
            new_bomb = bom(data, b)
            burned_data = burned(data, b)
            data = explosion(burned_data, new_bomb)

    return data

# 燃やす
def burned(data, b):
    data[b[1]][b[0]] = 0
    return data

# 燃焼範囲をチェック
def bom(data, b):
    bomb_area =  [(-3, 0), (-2, 0), (-1, 0), (1, 0), (2, 0), (3, 0),
                (0, -3), (0, -2), (0, -1), (0, 1), (0, 2), (0, 3)]
    new_bomb = []
    for x in bomb_area:
        buf = tuple([sum(x) for x in zip(x,b)])
        if isIn(*buf):
            new_bomb.append(buf)

    return new_bomb

if __name__=='__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python
# -*- coding: utf-8 -*-

def main():
    # 入力
    input = []
    while(True):
        input_list = list2int(raw_input().split())
        if len(input_list) > 0:
            input.append(input_list)
        else:
            break

    for x in input:
        print(sum(x))

# リストの要素をintに変換
def list2int(list):
    return [int(x) for x in list]

if __name__=='__main__':
    main()

Fixed submission:
#!/usr/bin/python
# -*- coding: utf-8 -*-

def main():
    # 入力
    input = []
    while(True):
        try:
            input_list = list2int(raw_input().split())
            input.append(input_list)
        except EOFError:
            break

    for x in input:
        print(sum(x))

# リストの要素をintに変換
def list2int(list):
    return [int(x) for x in list]

if __name__=='__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
mountains = [int(line.readline()) for line in sys.stdin]

for height in sorted(mountains)[-3:][::-1]:
    print(height)

Fixed submission:
mountains = [int(input()) for _ in range(10)]

for height in sorted(mountains)[-3:][::-1]:
    print(height)
Buggy python submission (verdict: Runtime Error):
import sys

def take2(iterable):
    while True:
        yield next(iterable), next(iterable)
#外積
def cross(v1, v2):
    return v1.real * v2.imag - v1.imag * v2.real
# 線分13と線分24の交点を求める
def get_intersection(p1,p2,p3,p4):
    a1 = p4 - p2
    b1 = p2 - p3
    b2 = p1 - p2
    s1 = cross(a1, b2) / 2
    s2 = cross(a1, b1) / 2
    return p1 + (p3 - p1) * s1 / (s1 + s2)

n = int(f.readline())
for i in range(n):
    p1, p2, p3 = [x + y * 1j for x, y in take2(map(float, f.readline().split()))]
    p12 = (p1 + p2) / 2
    p13 = (p1 + p3) / 2
    pxy = get_intersection(p12,p13,p12 + (p2 - p1) * 1j,p13 + (p1 - p3) * 1j)
    r = abs(pxy - p1)
    print('{:.3f} {:.3f} {:.3f}'.format(pxy.real,pxy.imag,r))

Fixed submission:
import sys
f = sys.stdin

def take2(iterable):
    while True:
        yield next(iterable), next(iterable)
#外積
def cross(v1, v2):
    return v1.real * v2.imag - v1.imag * v2.real
# 線分13と線分24の交点を求める
def get_intersection(p1,p2,p3,p4):
    a1 = p4 - p2
    b1 = p2 - p3
    b2 = p1 - p2
    s1 = cross(a1, b2) / 2
    s2 = cross(a1, b1) / 2
    return p1 + (p3 - p1) * s1 / (s1 + s2)

n = int(f.readline())
for i in range(n):
    p1, p2, p3 = [x + y * 1j for x, y in take2(map(float, f.readline().split()))]
    p12 = (p1 + p2) / 2
    p13 = (p1 + p3) / 2
    pxy = get_intersection(p12,p13,p12 + (p2 - p1) * 1j,p13 + (p1 - p3) * 1j)
    r = abs(pxy - p1)
    print('{:.3f} {:.3f} {:.3f}'.format(pxy.real,pxy.imag,r))
Buggy python submission (verdict: Runtime Error):
import sys
cars = []
for line in sys.stdin:
    car = int(line)
    if car:
        cars.append(num)
    else:
        print(cars.pop())

Fixed submission:
import sys

cars = []
for line in sys.stdin:
    car = int(line)
    if car:
        cars.append(car)
    else:
        print(cars.pop())
Buggy python submission (verdict: Runtime Error):
import sys
f = sys.stdin

def take2(iterable):
    i = iter(iterable)
    while True:
        yield next(i) + next(i) * 1j
    

n = int(f.readline())
for _ in range(n):
    xy = [xiyi for xiyi in take2(map(float, f.readline().split()))]
    a, b, c, d = xy
    temp = (a - b) / (c - d)
    if  abs(temp.imag) < 0.001:
        temp = (a - b) / (a - c)
        if abs(temp.imag) < 0.001:
            print('NO')
        else:
            print('YES')
    else:
        print('NO')

Fixed submission:
import sys

def cross(a, b):
    return a.real * b.imag - a.imag * b.real
 
n = sys.stdin.readline()
for line in sys.stdin:
    a, b, c, d = [x + y * 1j for x, y in zip(* [map(float, line.split())] * 2)]
    print('YES' if abs(cross(a - b, c - d)) < 1e-10 else 'NO')
Buggy python submission (verdict: Runtime Error):
import sys
f = sys.stdin

rhombus = oblong = 0
for line in f:
    a, b, c = map(int, line.split(','))
    if a == b:
        rhombus += 1
    if a * a + b * b == c * c:
        oblong += 1

print(oblong)
print(rhombus)

Fixed submission:
import collections
c = collections.Counter(input().split())
longest = ''
for word in c:
    if len(longest) < len(word):
        longest = word

print(c.most_common(1)[0][0], longest)
Buggy python submission (verdict: Runtime Error):
import sys
f = sys.stdin

while True:
    n, s = map(int, f.readline().split())
    if n == 0:
        break
    print(sum(1 for nums in itertools.combinations([i for i in range(10)], n) if sum(nums) == s))

Fixed submission:
import sys
f = sys.stdin

import itertools

while True:
    n, s = map(int, f.readline().split())
    if n == 0:
        break
    print(sum(1 for nums in itertools.combinations([i for i in range(10)], n) if sum(nums) == s))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
f = sys.stdin


board = [[0 for i in range(11)] for j in range(11)]
for i, line in enumerate(f):
    for j, c in enumerate(line.strip()):
        board[i + 1][1 + (i + 1) % 2 + j * 2] = int(c)

step = {(-1, 0 ):'L',(0, -1 ):'U',(1, 0 ):'R',(0, 1):'D'}
    
    
start = pre_loc = 1 + 1j
loc = 3 + 1j
print('R',end='')
while loc != start:
    for direct in [(pre_loc - loc) / 2 * 1j ** (i + 1) for i in range(3)]:
        if board[int(loc.imag + direct.imag)][int(loc.real + direct.real)]:
            pre_loc = loc
            loc += direct * 2
            print(step[(direct.real,direct.imag)],end='')
            break
print()

Fixed submission:
import sys
f = sys.stdin

board = [[0 for i in range(11)] for j in range(11)]
for i, line in enumerate(f):
    for j, c in enumerate(line.strip()):
        board[i + 1][1 + (i + 1) % 2 + j * 2] = int(c)

step = {(-1, 0 ):'L',(0, -1 ):'U',(1, 0 ):'R',(0, 1):'D'}
    
    
start = pre_loc = 1 + 1j
loc = 3 + 1j
print('R',end='')
while loc != start:
    for direct in [(pre_loc - loc) / 2 * 1j ** (i + 1) for i in range(4)]:
        if board[int(loc.imag + direct.imag)][int(loc.real + direct.real)]:
            pre_loc = loc
            loc += direct * 2
            print(step[(direct.real,direct.imag)],end='')
            break
print()
Buggy python submission (verdict: Runtime Error):
import sys
f = sys.stdin


import string

OFFSET = ord('a')

def to_gamma(c):
    return ord(c) - OFFSET

def from_gamma(gamma, alpha, beta):
    return chr((alpha * gamma + beta) % 26 + OFFSET) 

def affine(c, alpha, beta):
    return from_gamma(to_gamma(c), alpha, beta)


# g[0]==g[3]である前提
def search_that(w):
    b = to_gamma(w[2])
    for a in range(26):
        if w[0] == affine('t',a,b) and w[1] == affine('h',a,b):
            return a, b
    return -1, -1

def search_this(g):
    a = (to_gamma(w[0]) - to_gamma(w[3]) + 26) % 26
    for b in range(26):
        if w[0] == affine('t',a,b) and w[1] == affine('h',a,b) and w[2] == affine('i',a,b) and w[3] == affine('s',a,b):
            return a, b
    return -1, -1

def search(w):
    if w[0] == w[3]:
        return search_that(w)
    else:
        return search_this(w)

n = int(f.readline())
for i in range(n):
    line = f.readline().strip()
    words = [word for word in line.split() if len(word) == 4]
    for word in words:
        a, b = search(word)
        if a != -1:
            print(line.translate(str.maketrans(''.join([affine(c, a, b) for c in string.ascii_lowercase]), string.ascii_lowercase)))
            break    
    

Fixed submission:
import sys
f = sys.stdin

import string

OFFSET = ord('a')

def to_gamma(c):
    return ord(c) - OFFSET

def from_gamma(gamma, alpha, beta):
    return chr((alpha * gamma + beta) % 26 + OFFSET) 

def affine(c, alpha, beta):
    return from_gamma(to_gamma(c), alpha, beta)


# g[0]==g[3]である前提
def search_that(w):
    b = to_gamma(w[2])
    for a in range(26):
        if w[0] == affine('t',a,b) and w[1] == affine('h',a,b):
            return a, b
    return -1, -1

def search_this(w):
    a = (to_gamma(w[0]) - to_gamma(w[3]) + 26) % 26
    for b in range(26):
        if w[0] == affine('t',a,b) and w[1] == affine('h',a,b) and w[2] == affine('i',a,b) and w[3] == affine('s',a,b):
            return a, b
    return -1, -1

def search(w):
    if w[0] == w[3]:
        return search_that(w)
    else:
        return search_this(w)

n = int(f.readline())
for i in range(n):
    line = f.readline().strip()
    words = [word for word in line.split() if len(word) == 4]
    for word in words:
        a, b = search(word)
        if a != -1:
            print(line.translate(str.maketrans(''.join([affine(c, a, b) for c in string.ascii_lowercase]), string.ascii_lowercase)))
            break
Buggy python submission (verdict: Runtime Error):
import sys
f = sys.stdin


def take2(iterable):
    i = iter(iterable)
    while True:
        yield next(i), next(i)

for line in f:
    a1,a2,b1,b2 = [x + y * 1j for x, y in take2(map(float, line.split()))]
    
    if (min(a1.real, a2.real) <= b1.real <= max(a1.real, a2.real) or (min(a1.real, a2.real) <= b2.real <= max(a1.real, a2.real))) and 
    (min(a1.imag, a2.imag) <= b1.imag <= max(a1.imag, a2.imag) or (min(a1.imag, a2.imag) <= b2.imag <= max(a1.imag, a2.imag))):
        print('YES')
    else:
        print('NO')

Fixed submission:
import sys
f = sys.stdin

# a1が左下、a2が右上とされている事がポイント
for line in f:
    xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2 = map(float, line.split())
    print('NO'  if xb2 < xa1 or xa2 < xb1 or yb2 < ya1 or ya2 < yb1 else 'YES')
Buggy python submission (verdict: Runtime Error):
import sys
f = sys.stdin

vlines = [[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]

for line in f:
    result = 'd'
    for v in vlines:
        if 's' != a and line[v[0]]== line[v[1]] == line[v[2]]:
            result = line[v[0]]
            break
    print(result)

Fixed submission:
import sys
f = sys.stdin


vlines = [[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]

for line in f:
    result = 'd'
    for v in vlines:
        if 's' !=  line[v[0]] and line[v[0]]== line[v[1]] == line[v[2]]:
            result = line[v[0]]
            break
    print(result)