t=int(input())
while 1>t or t>20000:
t=int(input(“reenter constraints 0<=t<=20,000\n”))
la={}
lb={}
for i in range(t):
a=input().lower()
while len(a)!=3:
a=input(“length exceed\n”).lower()
b=input().lower()
while len(b)!=3:
b=input(“length exceed\n”).lower()
la[i]=list(a)
lb[i]=list(b)
acount=bcount=0
for i in range (t):
for j in range (3):
if la[i][j]==“b” or lb[i][j]==“b”:
acount+=1
elif la[i][j]==“o” or lb[i][j]==“o”:
bcount+=1
if acount==2 and bcount==1:
print(“yes”)
acount=0
bcount=0
else:
print(“no”)
acount=0
bcount=0
t=int(input())
while 1>t or t>20000:
t=int(input("reenter constraints 0<t,<20,000\n"))
la={}
lb={}
for i in range(t):
a=input().lower()
while len(a)!=3:
a=input("length exceed\n").lower()
b=input().lower()
while len(b)!=3:
b=input("length exceed\n").lower()
la[i]=list(a)
lb[i]=list(b)
acount=bcount=0
for i in range (t):
for j in range (3):
if la[i][j]=="b" or lb[i][j]=="b":
acount+=1
elif la[i][j]=="o" or lb[i][j]=="o":
bcount+=1
if acount==2 and bcount==1:
print("yes")
acount=0
bcount=0
else:
print("no")
acount=0
bcount=0
Delete this question. If you don’t want to get suspended from forum.