Paste
Pasted as Python by registered user sadmin ( 7 years ago )
for i in range(int(input())):
top = input()
bottom=input()
a = top[0]+bottom[0]
b = top[1]+bottom[1]
c = top[2]+bottom[2]
li=[a,b,c]
b_ind = [index for index, value in enumerate(li) if 'b' in value]
o_ind = [index for index, value in enumerate(li) if 'o' in value]
if len(b_ind)<=1:
print("no")
continue
if len(o_ind) ==0:
print("no")
continue
else:
if b_ind==o_ind and len(b_ind)!=3:
print("no")
continue
else:
print("yes")
Revise this Paste
Parent: 94392