import sys


def main():
    N, A, B, C = [int(v) for v in input().split()]

    total = A + B + C

    if total == 0:
        print('No')
        exit()

    choice = []
    if total != 2:
        for _ in range(N):
            s = sys.stdin.readline().rstrip()
            if s == 'AB':
                if A == 0 and B == 0:
                    print('No')
                    exit()
                if A < B:
                    B -= 1
                    A += 1
                    choice.append('A')
                else:
                    A -= 1
                    B += 1
                    choice.append('B')
            elif s == 'BC':
                if B == 0 and C == 0:
                    print('No')
                    exit()
                if B < C:
                    C -= 1
                    B += 1
                    choice.append('B')
                else:
                    B -= 1
                    C += 1
                    choice.append('C')
            elif s == 'AC':
                if A == 0 and C == 0:
                    print('No')
                    exit()
                if A < C:
                    C -= 1
                    A += 1
                    choice.append('A')
                else:
                    A -= 1
                    C += 1
                    choice.append('C')
    else:
        s = sys.stdin.readline().rstrip()
        for _ in range(N - 1):
            s1 = sys.stdin.readline().rstrip()
            if s == 'AB':
                if A == 0 and B == 0:
                    print('No')
                    exit()
                if A < B:
                    B -= 1
                    A += 1
                    choice.append('A')
                elif A > B:
                    A -= 1
                    B += 1
                    choice.append('B')
                elif s1 == 'AC':
                    A += 1
                    B -= 1
                    choice.append('A')
                else:
                    A -= 1
                    B += 1
                    choice.append('B')

            elif s == 'BC':
                if B == 0 and C == 0:
                    print('No')
                    exit()
                if B < C:
                    C -= 1
                    B += 1
                    choice.append('B')
                elif B > C:
                    B -= 1
                    C += 1
                    choice.append('C')
                elif s1 == 'AC':
                    B -= 1
                    C += 1
                    choice.append('C')
                else:
                    C -= 1
                    B += 1
                    choice.append('B')

            elif s == 'AC':
                if A == 0 and C == 0:
                    print('No')
                    exit()
                if A < C:
                    C -= 1
                    A += 1
                    choice.append('A')
                elif A > C:
                    A -= 1
                    C += 1
                    choice.append('C')
                elif s1 == 'AB':
                    C -= 1
                    A += 1
                    choice.append('A')
                else:
                    A -= 1
                    C += 1
                    choice.append('C')
            s = s1

        if s == 'AB':
            if A == 0 and B == 0:
                print('No')
                exit()
            if A < B:
                B -= 1
                A += 1
                choice.append('A')
            else:
                A -= 1
                B += 1
                choice.append('B')

        elif s == 'BC':
            if B == 0 and C == 0:
                print('No')
                exit()
            if B < C:
                C -= 1
                B += 1
                choice.append('B')
            else:
                B -= 1
                C += 1
                choice.append('C')

        elif s == 'AC':
            if A == 0 and C == 0:
                print('No')
                exit()
            if A < C:
                C -= 1
                A += 1
                choice.append('A')
            else:
                A -= 1
                C += 1
                choice.append('C')

    print('Yes')
    for c in choice:
        print(c)


main()


Measured memory_bytes: 10088