n, a, b, c = map(int, input().split())

sum = a + b + c
lst = []
if sum != 2:
    for _ in range(n):
        s = input()
        if s == "AB":
            if a < b:
                a += 1
                b -= 1
                lst.append("A")
            else:
                a -= 1
                b += 1
                if a < 0:
                    print("No")
                    break
                lst.append("B")
        elif s == "AC":
            if a < c:
                a += 1
                c -= 1
                lst.append("A")
            else:
                a -= 1
                c += 1
                if a < 0:
                    print("No")
                    break
                lst.append("C")
        else:
            if c < b:
                c += 1
                b -= 1
                lst.append("C")
            else:
                c -= 1
                b += 1
                if c < 0:
                    print("No")
                    break
                lst.append("B")
    else:
        print("Yes")
        for alpha in lst:
            print(alpha)
elif n == 1:
    s = input()
    if s == "AB":
        if a == b == 0:
            print("No")
        else:
            print("Yes")
            if a > b:
                print("B")
            else:
                print("A")
    elif s == "AC":
        if a == c == 0:
            print("No")
        else:
            print("Yes")
            if a > c:
                print("C")
            else:
                print("A")
    else:
        if c == b == 0:
            print("No")
        else:
            print("Yes")
            if c > b:
                print("B")
            else:
                print("C")            
                
else:
    s = input()
    flag = True
    flag2 = True
    for _ in range(n - 1):
        if s == "AB":
            if a == b == 0:
                print("No")
                flag2 = False
                break
            elif a != b:
                if a > b:
                    lst.append("B")
                    a -= 1
                    b += 1
                else:
                    lst.append("A")
                    a += 1
                    b -= 1
                s = input()
                flag = True
            else:
                s = input()
                if s == "AB":
                    lst.append("A")
                    a = 2
                    b = 0
                elif s == "AC":
                    lst.append("A")
                    a = 2
                    b = 0
                else:
                    lst.append("B")
                    b = 2
                    a = 0
                    
        elif s == "AC":
            if a == c == 0:
                print("No")
                flag2 = False
                break
            elif a != c:
                if a > c:
                    lst.append("C")
                    a -= 1
                    c += 1
                else:
                    lst.append("A")
                    a += 1
                    c -= 1
                s = input()
                flag = True
            else:
                s = input()
                if s == "AC":
                    lst.append("A")
                    a = 2
                    c = 0
                elif s == "AB":
                    lst.append("A")
                    a = 2
                    c = 0
                else:
                    lst.append("C")
                    c = 2
                    a = 0
                    
        else:
            if b == c == 0:
                print("No")
                flag2 = False
                break
            elif b != c:
                if b > c:
                    lst.append("C")
                    b -= 1
                    c += 1
                else:
                    lst.append("B")
                    b += 1
                    c -= 1
                s = input()
                flag = True
            else:
                s = input()
                if s == "BC":
                    lst.append("B")
                    b = 2
                    c = 0
                elif s == "AB":
                    lst.append("B")
                    b = 2
                    c = 0
                else:
                    lst.append("C")
                    c = 2
                    b = 0
    else:
        if flag:
            if s == "AB":
                if a == b == 0:
                    print("No")
                    flag2 = False
                if a < b:
                    lst.append("A")
                else:
                    lst.append("B")
            elif s == "AC":
                if a == c == 0:
                    print("No")
                    flag2 = False
                if a < c:
                    lst.append("A")
                else:
                    lst.append("C")
            else:
                if b == c == 0:
                    print("No")
                    flag2 = False
                if b < c:
                    lst.append("B")
                else:
                    lst.append("C")
    if flag2:
        print("Yes")
        for alpha in lst:
            print(alpha)


Measured memory_bytes: 10180