楼上太牛,直接抄作业,改都不用改,太完美了,.
l=[]
for i in range(3):
l.extend(input().split())
lk = ['K','K','K']
lb = ['B','B','B']
n=[l[0:3],l[3:6],l[6:9],l[0::3],l[1::3],l[2::3],l[0::4],l[2:7:2],-1]
m ={'K':'KiKi wins!','B':'BoBo wins!','O':'No winner!'}
for i in n:
if i == lk or i ==lb:
print(m[i[0]])
break
if i ==-1:
print(m['O'])