let input = readLine()!.characters.split(" ").map{Int(String($0))!}
var A = input[1]
var B = input[2]
for c in readLine()!.characters {
  if c==a && A+B>0 {
    print("Yes")
    A>0 ?A-=1:B-=1
  } else if c==b && B>0 {
    print("Yes")
    B--
  }
}