import sys

N, A, B, C = map(int,input().split())
Q = []
for _ in range(N):
    Q.append(input())

def check(i, A, B, C):
    if A < 0 or B < 0 or C < 0:
        return False
    if Q[i] == 'AB':
        return not (A == 0 and B == 0)
    if Q[i] == 'AC':
        return not (A == 0 and C == 0)
    return not (B == 0 and C == 0)

L = []
for i in range(N):
    if i == N-1:
        if Q[i] == 'AB':
            if A == 0 and B == 0:
                print('No')
                sys.exit()
            elif A == 0:
                L.append('A')
                A += 1
                B -= 1
                if B < 0:
                    print('No')
                    sys.exit()
            else:
                L.append('B')
                A -= 1
                B += 1
                if A < 0:
                    print('No')
                    sys.exit()
        elif Q[i] == 'AC':
            if A == 0 and C == 0:
                print('No')
                sys.exit()
            elif A == 0:
                L.append('A')
                A += 1
                C -= 1
                if C < 0:
                    print('No')
                    sys.exit()
            else:
                L.append('C')
                A -= 1
                C += 1
                if A < 0:
                    print('No')
                    sys.exit()
        else:
            if B == 0 and C == 0:
                print('No')
                sys.exit()
            elif B == 0:
                L.append('B')
                B += 1
                C -= 1
                if C < 0:
                    print('No')
                    sys.exit()
            else:
                L.append('C')
                B -= 1
                C += 1
                if B < 0:
                    print('No')
                    sys.exit()
    else:
        if not check(i, A, B, C):
            print('No')
            sys.exit()
        if Q[i] == 'AB':
            if check(i+1, A+1, B-1, C):
                L.append('A')
                A += 1
                B -= 1
                if B < 0:
                    print('No')
                    sys.exit()
            elif check(i+1, A-1, B+1, C):
                L.append('B')
                A -= 1
                B += 1
                if A < 0:
                    print('No')
                    sys.exit()
            else:
                print('No')
                sys.exit()
        elif Q[i] == 'AC':
            if check(i+1, A+1, B, C-1):
                L.append('A')
                A += 1
                C -= 1
                if C < 0:
                    print('No')
                    sys.exit()
            elif check(i+1, A-1, B, C+1):
                L.append('C')
                A -= 1
                C += 1
                if A < 0:
                    print('No')
                    sys.exit()
            else:
                print('No')
                sys.exit()
        else:
            if check(i+1, A, B+1, C-1):
                L.append('B')
                B += 1
                C -= 1
                if C < 0:
                    print('No')
                    sys.exit()
            elif check(i+1, A, B-1, C+1):
                L.append('C')
                B -= 1
                C += 1
                if B < 0:
                    print('No')
                    sys.exit()
            else:
                print('No')
                sys.exit()


print('Yes')
for i in L:
    print(i)

Measured memory_bytes: 16928