import kotlin.math.min

fun StringBuilder.appendln(s: String): StringBuilder {
    this.append(s)
    this.append("\n")
    return this
}

fun main() {
    val builder = StringBuilder()

    var (n, a, b, c) = readInputLine().split(" ").map { it.toInt() }

    val query = Array(n) { readInputLine() }

    builder.appendln("Yes")

    for (i in 0 until n) {
        when(query[i]) {
            "AB" -> {
                if (a == 0 && b == 0) {
                    println("No")
                    return
                }
                if (a < b || (a == 1 && b == 1 && query[min(i + 1, n - 1)] == "AC")) {
                    builder.appendln("A")
                    a++
                    b--
                } else {
                    builder.appendln("B")
                    a--
                    b++
                }
            }
            "AC" -> {
                if (a == 0 && c == 0) {
                    println("No")
                    return
                }
                if (a < c || (a == 1 && c == 1 && query[min(i + 1, n - 1)] == "AB")) {
                    builder.appendln("A")
                    a++
                    c--
                } else {
                    builder.appendln("C")
                    a--
                    c++
                }
            }
            "BC" -> {
                if (b == 0 && c == 0) {
                    println("No")
                    return
                }
                if (b < c || (b == 1 && c == 1 && query[min(i + 1, n - 1)] == "AB")) {
                    builder.appendln("B")
                    b++
                    c--
                } else {
                    builder.appendln("C")
                    b--
                    c++
                }
            }
        }
    }

    println(builder.toString())
}

fun readInputLine(): String {
    return readLine()!!
}
