import java.io.BufferedReader
import java.io.InputStreamReader

fun main() {
    val jin = BufferedReader(InputStreamReader(System.`in`))
    val line = jin.readLine().split(" ")
    val n = line[0].toInt()
    val xs = IntArray(3) { line[it + 1].toInt() }
    val s = "ABC"
    val strings = Array(n) { jin.readLine() }
    var possible = true
    val answer = mutableListOf<Char>()
    for (j in 0 until n) {
        val k1 = when (strings[j]) {
            "AB" -> 0
            "BC" -> 1
            else -> 2
        }
        val k2 = (k1 + 1) % 3
        if (xs[k1] == 0) {
            if (xs[k2] == 0) {
                possible = false
                break
            } else {
                answer.add(s[k1])
                xs[k1]++
                xs[k2]--
            }
        } else {
            if (xs[k2] == 0) {
                answer.add(s[k2])
                xs[k2]++
                xs[k1]--
            } else {
                if (j == n - 1 || s[k1] in strings[j + 1]) {
                    answer.add(s[k1])
                    xs[k1]++
                    xs[k2]--
                } else {
                    answer.add(s[k2])
                    xs[k2]++
                    xs[k1]--
                }
            }
        }
    }
    if (possible) {
        println("Yes")
        println(answer.joinToString("\n"))
    } else {
        println("No")
    }
}