Buggy python submission (verdict: Runtime Error):
letter=list(input())
n=int(input())
for i in range(n):
    ope=input().split(" ")
    o1=int(ope[0])
    if o1 ==1:
        letter.reverse()
    else:
        o2,o3_s=int(ope[1]),ope[2]
        if o2==1:
            for j in range( 1,len(o3_s)+1):
                letter.insert(0,o3_s[len(o3_s)-j])
        else:
            for j in range(len(o3_s)):
                letter.append(o3_s[j])
print("".join(letter))

Fixed submission:
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
letter=input()
n=int(input())
for i in range(n):
    ope=input().split(" ")
    o1=int(ope[0])
    if o1 ==1:
        letter="".join(list(reversed(letter)))
    else:
        o2,o3_s=int(ope[1]),ope[2]
        if o2==1:
            letter=o3_s+letter
        else:
            letter=letter+o3_s
print(letter)

Fixed submission:
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value=max(round(t8*100/8),round(t10*100/10))+1
for i in range(value):
  v=value-i
  tax8=v*8/100
  tax10=v*10/100
  if tax8>=t8 and tax8<t8+1 and tax10>=t10 and tax10<t10+1:
    ans=v
  elif tax8<t8 or tax10<t10:
    break
print(ans)

Fixed submission:
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value_f=int(max(round(t8*100/8),round(t10*100/10))+1)
while True:
  tax8,tax10=value_f*8/100,value_f*10/100
  if tax8>=t8 and tax8<t8+1 and tax10>=t10 and tax10<t10+1:
    ans=value_f
  elif tax8<t8 or tax10<t10:
    print(ans)
    break
  value_f-=1
  if value_f<0:
    break

Fixed submission:
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
import math
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value_f=max(round(t8*100/8),round(t10*100/10))+1
while value_f>=0:
	tax8,tax10=value_f*8/100,value_f*10/100
	if tax8>=t8 and tax8<t8+1 and tax10>=t10 and tax10<t10+1:
		ans=value_f
	elif tax8<t8 or tax10<t10:
		print(ans)
		break
	value_f-=1

Fixed submission:
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
import math
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value_f=max(math.ceil(t8*100/8),math.ceil(t10*10))
while value_f>=0:
	tax8,tax10=math.floor(value_f*0.08),math.floor(value_f*0.1)
	if tax8==t8 and tax10==t10:
		ans=value_f
	elif tax8<t8 or tax10<t10:
		print(ans)
		break
	value_f-=1

Fixed submission:
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
import math
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value=t8*100/8
value_f=math.ceil(value*1.2)
while True:
	tax8,tax10=math.floor(value_f*0.08),math.floor(value_f*0.1)
	if tax8== t8 and tax10==t10:
		ans=value_f
		value_f-=1
	elif tax8<t8 or tax10<t10:
		print(ans)
		break
	else:
		value_f-=1
	if value_f==0:
		print(ans)
		break

Fixed submission:
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")