let input = readLine()!.split(separator: " ")
let N = Int(input[0])!
var A = Int(input[1])!
var B = Int(input[2])!
var C = Int(input[3])!

var result = true
var process = ""
for i in 0..<N {
  let str = readLine()!
  switch str {
  case "AC":
  	if A > C {
      A -= 1
      C += 1
      process += "C"
    } else {
      A += 1
      C -= 1
      process += "A"
    }
   case "AB":
    if A > B {
      A -= 1
      B += 1
      process += "B"
    } else {
      A += 1
      B -= 1
      process += "A"
    }
   case "BC":
    if B > C {
      B -= 1
      C += 1
      process += "C"
    } else {
      B += 1
      C -= 1
      process += "B"
    }
    default:()
  }
  process += "\n"
  if A < 0 || B < 0 || C < 0 {
    result = false
    break
  }
}
print(result ? "Yes" : "No")
if result {
	print(process)
}