n,a,b,c = map(int,input().split())
s = [str(input()) for i in range(n)]
lis = [a,b,c]
ans = ""
for i in range(n-1):
    if lis[ord(s[i][0]) - ord("A")] * lis[ord(s[i][1]) - ord("A")] == 0:
        print("No")
        exit()
    if s[i] == s[i+1]:
        if lis[ord(s[i][0])] == 0:
            ans += s[i][0]
            lis[ord(s[i][0])] += 1
            lis[ord(s[i][1])] -= 1
        else:
            ans += s[i][1]
            lis[ord(s[i][0])-ord("A")] -= 1
            lis[ord(s[i][1])-ord("A")] += 1
    else:
        if s[i] == "AB":
            if s[i+1] == "AC":
                if lis[1] == 0:
                    ans += "B"
                    lis[1] += 1
                    lis[0] -= 1
                else:
                    ans += "A"
                    lis[0] += 1
                    lis[1] -= 1
            else:
                if lis[0] == 0:
                    ans += "A"
                    lis[0] += 1
                    lis[1] -= 1
                else:
                    ans += "B"
                    lis[0] -= 1
                    lis[1] += 1
        elif s[i] == "AC":
            if s[i+1] == "AB":
                if lis[2] == 0:
                    ans += "C"
                    lis[2] += 1
                    lis[0] -= 1
                else:
                    ans += "A"
                    lis[0] += 1
                    lis[2] -= 1
            else:
                if lis[0] == 0:
                    ans += "A"
                    lis[0] += 1
                    lis[2] -= 1
                else:
                    ans += "C"
                    lis[0] -= 1
                    lis[2] += 1
        else:
            if s[i+1] == "AB":
                if lis[2] == 0:
                    ans += "C"
                    lis[2] += 1
                    lis[1] -= 1
                else:
                    ans += "B"
                    lis[2] -= 1
                    lis[1] += 1
            else:
                if lis[1] == 0:
                    ans += "B"
                    lis[1] += 1
                    lis[2] -= 1
                else:
                    ans += "C"
                    lis[2] += 1
                    lis[1] -= 1
if lis[ord(s[-1][0])-ord("A")] == 0:
    if lis[ord(s[-1][1])-ord("A")] == 0:
        print("No")
        exit()
    else:
        ans += s[-1][0]
else:
    ans += s[-1][1]
print("Yes")
for i in range(n):
    print(ans[i])

### FIXED CODE ###

n,a,b,c = map(int,input().split())
s = [str(input()) for i in range(n)]
lis = [a,b,c]
ans = ""
for i in range(n-1):
    if lis[ord(s[i][0]) - ord("A")] == 0 and lis[ord(s[i][1]) - ord("A")] == 0:
        print("No")
        exit()
    if s[i] == s[i+1]:
        if lis[ord(s[i][0])-ord("A")] == 0:
            ans += s[i][0]
            lis[ord(s[i][0])-ord("A")] += 1
            lis[ord(s[i][1])-ord("A")] -= 1
        else:
            ans += s[i][1]
            lis[ord(s[i][0])-ord("A")] -= 1
            lis[ord(s[i][1])-ord("A")] += 1
    else:
        if s[i] == "AB":
            if s[i+1] == "AC":
                if lis[1] == 0:
                    ans += "B"
                    lis[1] += 1
                    lis[0] -= 1
                else:
                    ans += "A"
                    lis[0] += 1
                    lis[1] -= 1
            else:
                if lis[0] == 0:
                    ans += "A"
                    lis[0] += 1
                    lis[1] -= 1
                else:
                    ans += "B"
                    lis[0] -= 1
                    lis[1] += 1
        elif s[i] == "AC":
            if s[i+1] == "AB":
                if lis[2] == 0:
                    ans += "C"
                    lis[2] += 1
                    lis[0] -= 1
                else:
                    ans += "A"
                    lis[0] += 1
                    lis[2] -= 1
            else:
                if lis[0] == 0:
                    ans += "A"
                    lis[0] += 1
                    lis[2] -= 1
                else:
                    ans += "C"
                    lis[0] -= 1
                    lis[2] += 1
        else:
            if s[i+1] == "AB":
                if lis[2] == 0:
                    ans += "C"
                    lis[2] += 1
                    lis[1] -= 1
                else:
                    ans += "B"
                    lis[2] -= 1
                    lis[1] += 1
            else:
                if lis[1] == 0:
                    ans += "B"
                    lis[1] += 1
                    lis[2] -= 1
                else:
                    ans += "C"
                    lis[2] += 1
                    lis[1] -= 1
if lis[ord(s[-1][0])-ord("A")] == 0:
    if lis[ord(s[-1][1])-ord("A")] == 0:
        print("No")
        exit()
    else:
        ans += s[-1][0]
else:
    ans += s[-1][1]
print("Yes")
for i in range(n):
    print(ans[i])