//package abc166.F

import java.io.*
import java.math.*
import java.util.*
import kotlin.math.*

var reader: BufferedReader = System.`in`.bufferedReader()
var writer: PrintWriter = PrintWriter(System.`out`)

fun next() = reader.readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun nextStrings() = next().split(" ")
fun nextInts() = nextStrings().map { it.toInt() }
fun nextLongs() = nextStrings().map { it.toLong() }
fun nextDoubles() = nextStrings().map { it.toDouble() }

fun put(v: Any?) = writer.print(v)
fun puts() = writer.println()
fun puts(v: Any?) = writer.println(v)

var debug = false
fun dp(v: Any?) {
    if (debug) println(v)
}
fun dp() {
    if (debug) println()
}

fun test(case: Int, input: String, expected: String) {
    reader = input.trimIndent().reader().buffered()

    val stringWriter = StringWriter()
    writer = PrintWriter(stringWriter)

    solve()
    writer.flush()

    val actual = stringWriter.toString()

    println("[test $case]")
    if ("${expected}" == actual) {
        println("OK")
    } else {
        println("NG")
        println()
        println("expected: \"${expected}\"")
        println("actual:   \"${actual}\"")
    }
    println()
}

@Suppress("UNUSED_PARAMETER")
fun xtest(case: Int, input: String, expected: String) {}

fun main(args: Array<String>) {
    if ((args.size == 1) && (args[0] == "test")) {
        testAll()
    } else {
        solve()
        writer.flush()
    }
}

///////////////////////////////////////////////////////////

fun testAll() {
    debug = true

    test(1,
    """
    2 1 3 0
    AB
    AC
    """,
    """
    Yes
    A
    C
    """.trimIndent().trim()
    )
    test(2,
    """
    3 1 0 0
    AB
    BC
    AB
    """,
    "No"
    )
    test(3,
    """
    1 0 9 0
    AC
    """,
    "No"
    )
    test(4,
    """
    8 6 9 1
    AC
    BC
    AB
    BC
    AC
    BC
    AB
    AB
    """,
    """
    Yes
    C
    B
    B
    C
    C
    B
    A
    A
    """.trimIndent().trim()
    )
    test(5,
    """
    2 1 1 0
    AB
    AC
    """,
    """
    Yes
    A
    C
    """.trimIndent().trim()
    )
}

fun distribute(x: Int, y: Int, nextX: Boolean = true): Boolean? {
    if ((x == 0) && (y == 0)) {
        return null
    }
    if (x == 0) {
        // Pair(x+1, y-1)
        return true
    }
    if (y == 0) {
        // Pair(x-1, y+1)
        return false
    }
    if ((x > 1) || (y > 1)) {
        return (x < y)
    }

    return nextX
}

fun doSolve(): List<String> {

    var (N, A, B, C) = nextInts()

    val result = mutableListOf<String>()

    var prev = next()
    repeat(N-1) {
        val next = next()

        if (prev == "AB") {
            val nextA = (next != "BC")
            val ret = distribute(A, B, nextA) ?: return emptyList()
            if (ret) {
                ++A
                --B
                result.add("A")
            } else {
                --A
                ++B
                result.add("B")
            }
        } else if (prev == "BC") {
            val nextB = (next != "AC")
            val ret = distribute(B, C, nextB) ?: return emptyList()
            if (ret) {
                ++B
                --C
                result.add("B")
            } else {
                --B
                ++C
                result.add("C")
            }
        } else {
            val nextC = (next != "AB")
            val ret = distribute(C, A, nextC) ?: return emptyList()
            if (ret) {
                ++C
                --A
                result.add("C")
            } else {
                --C
                ++A
                result.add("A")
            }
        }

        prev = next
    }

    if (prev == "AB") {
        val ret = distribute(A, B) ?: return emptyList()
        if (ret) {
            ++A
            --B
            result.add("A")
        } else {
            --A
            ++B
            result.add("B")
        }
    } else if (prev == "BC") {
        val ret = distribute(B, C) ?: return emptyList()
        if (ret) {
            ++B
            --C
            result.add("B")
        } else {
            --B
            ++C
            result.add("C")
        }
    } else {
        val ret = distribute(C, A) ?: return emptyList()
        if (ret) {
            ++C
            --A
            result.add("C")
        } else {
            --C
            ++A
            result.add("A")
        }
    }

    return result
}

fun solve() {
    val result = doSolve()
    if (!result.isEmpty()) {
        puts("Yes")
        put(result.joinToString("\n"))
    } else {
        put("No")
    }
}
