N, A, B, C = map(int, input().split())
ss = [input() for _ in range(N)]
history = []

hashing = {"AB": 6, "BC": 3, "AC": 5}
appeared = {"AB": False, "BC": False, "AC": False}

connected = hashing[ss[0]]
appeared[ss[0]] = True
for i in range(1, N):
    connected ^= hashing[ss[i]]
    if connected == 3:
        appeared["AB"] = True
    elif connected == 5:
        appeared["AC"] = True
    elif connected == 6:
        appeared["BC"] = True

flg = True

if A == 0 and B == 0 and C == 0:
    flg = False
elif A == 0 and B == 0:
    if not appeared["AB"]:
        flg = False
elif B == 0 and C == 0:
    if not appeared["BC"]:
        flg = False
elif C == 0 and A == 0:
    if not appeared["AC"]:
        flg = False
else:
    for s in ss:
        if s == "AB":
            if A > B:
                history.append('B')
                A -= 1
                B += 1
            else:
                history.append('A')
                A += 1
                B -= 1
        elif s == "AC":
            if A > C:
                history.append('C')
                A -= 1
                C += 1
            else:
                history.append('A')
                A += 1
                C -= 1
        elif s == "BC":
            if B > C:
                history.append('C')
                B -= 1
                C += 1
            else:
                history.append('B')
                B += 1
                C -= 1
        if A < 0 or B < 0 or C < 0:
            flg = False
            break
        
        
if flg:
    print("Yes")
    print(*history, sep = '\n')
else:
    print("No")