n, a, b, c = map(int, input().split())
q = [input() for i in range(n)]
if [a, b, c].count(0) <= 1:
    print("Yes")
    for i in range(n-1):
        if q[i] == "AB":
            if a == 0:
                print("A")
                a += 1
                b -= 1

            elif b == 0:
                print("B")
                b += 1
                a -= 1

            else:
                if q[i+1] == "AB":
                    print("A")
                    a += 1
                    b -= 1
                elif q[i+1] == "BC":
                    print("B")
                    b += 1
                    a -= 1
                else:
                    print("A")
                    a += 1
                    b -= 1

        elif q[i] == "BC":
            if b == 0:
                print("B")
                b += 1
                c -= 1

            elif c == 0:
                print("C")
                c += 1
                b -= 1

            else:
                if q[i+1] == "BC" or q[i+1] == "AB":
                    print("B")
                    b += 1
                    c -= 1
                elif q[i+1] == "AC":
                    print("C")
                    c += 1
                    b -= 1

        else:
            if a == 0:
                print("A")
                a += 1
                c -= 1

            elif c == 0:
                print("C")
                c += 1
                a -= 1

            else:
                if q[i+1] == "AC" or q[i+1] == "AB":
                    print("A")
                    a += 1
                    c -= 1
                elif q[i+1] == "BC":
                    print("C")
                    c += 1
                    a -= 1
    if q[-1] == "AC":
        if a == 0:
            print("A")
        else:
            print("C")
    elif q[-1] == "AB":
        if a == 0:
            print("A")
        else:
            print("B")
    else:
        if b == 0:
            print("B")
        else:
            print("C")


else:
    flag = 1
    A, B, C = a, b, c
    for i in range(n):
        if q[i] == "AB":
            if a == 0 and b == 0:
                flag = 0
                break
            elif a == 0:
                a += 1
                b -= 1
            elif b == 0:
                b += 1
                a -= 1
            else:
                break

        elif q[i] == "BC":
            if b == 0 and c == 0:
                flag = 0
                break
            elif b == 0:
                b += 1
                c -= 1
            elif c == 0:
                c += 1
                b -= 1
            else:
                break
        else:
            if a == 0 and c == 0:
                flag = 0
                break
            elif a == 0:
                a += 1
                c -= 1
            elif c == 0:
                c += 1
                a -= 1
            else:
                break
        if [a, b, c].count(0) <= 1:
            break
    if flag == 0:
        print("No")
    else:
        print("Yes")
        a, b, c = A, B, C
        for i in range(n-1):
            if q[i] == "AB":
                if a == 0:
                    print("A")
                    a += 1
                    b -= 1

                elif b == 0:
                    print("B")
                    b += 1
                    a -= 1

                else:
                    if q[i+1] == "AB":
                        print("A")
                        a += 1
                        b -= 1
                    elif q[i+1] == "BC":
                        print("B")
                        b += 1
                        a -= 1
                    else:
                        print("A")
                        a += 1
                        b -= 1

            elif q[i] == "BC":
                if b == 0:
                    print("B")
                    b += 1
                    c -= 1

                elif c == 0:
                    print("C")
                    c += 1
                    b -= 1

                else:
                    if q[i+1] == "BC" or q[i+1] == "AB":
                        print("B")
                        b += 1
                        c -= 1
                    elif q[i+1] == "AC":
                        print("C")
                        c += 1
                        b -= 1

            else:
                if a == 0:
                    print("A")
                    a += 1
                    c -= 1

                elif c == 0:
                    print("C")
                    c += 1
                    a -= 1

                else:
                    if q[i+1] == "AC" or q[i+1] == "AB":
                        print("A")
                        a += 1
                        c -= 1
                    elif q[i+1] == "BC":
                        print("C")
                        c += 1
                        a -= 1
        if q[-1] == "AC":
            if a == 0:
                print("A")
            else:
                print("C")
        elif q[-1] == "AB":
            if a == 0:
                print("A")
            else:
                print("B")
        else:
            if b == 0:
                print("B")
            else:
                print("C")


Measured memory_bytes: 16396