### BUGGY CODE ###

import sys

sys.setrecursionlimit(1000000)


def recur(current_a, current_b, current_c, ls: [], ans: []):
    s = ls[0]
    if s == "AB":
        if current_a == 0 and current_b == 0:
            return False, []
        elif current_a == 0:
            ans.append("A")
            if len(ls) == 1:
                return True, ans
            ans_1 = ans[:]
            return recur(current_a + 1, current_b - 1, current_c, ls[1:], ans_1)
        elif current_b == 0:
            ans.append("B")
            if len(ls) == 1:
                return True, ans
            ans_1 = ans[:]
            return recur(current_a - 1, current_b + 1, current_c, ls[1:], ans_1)
        else:
            if len(ls) == 1:
                ans.append("A")
                return True, ans

            ans_1 = ans[:]
            ans_1.append("A")
            res, ans_1 = recur(current_a + 1, current_b - 1, current_c, ls[1:], ans_1)
            if res:
                return True, ans_1

            ans.append("B")
            return recur(current_a - 1, current_b + 1, current_c, ls[1:], ans)
    elif s == "AC":
        if current_a == 0 and current_c == 0:
            return False, []
        elif current_a == 0:
            ans.append("A")
            if len(ls) == 1:
                return True, ans
            return recur(current_a + 1, current_b, current_c - 1, ls[1:], ans)
        elif current_c == 0:
            ans.append("C")
            if len(ls) == 1:
                return True, ans
            return recur(current_a - 1, current_b, current_c + 1, ls[1:], ans)
        else:
            if len(ls) == 1:
                ans.append("A")
                return True, ans

            ans_1 = ans[:]
            ans_1.append("A")
            res, ans_1 =recur(current_a + 1, current_b, current_c - 1, ls[1:], ans_1)
            if res:
                return True, ans_1

            ans.append("C")
            return recur(current_a - 1, current_b, current_c + 1, ls[1:], ans)
    elif s == "BC":
        if current_b == 0 and current_c == 0:
            return False, []
        elif current_b == 0:
            ans.append("B")
            if len(ls) == 1:
                return True, ans
            return recur(current_a, current_b + 1, current_c - 1, ls[1:], ans)
        elif current_c == 0:
            ans.append("C")
            if len(ls) == 1:
                return True, ans
            return recur(current_a, current_b - 1, current_c + 1, ls[1:], ans)
        else:
            if len(ls) == 1:
                ans.append("B")
                return True, ans

            ans_1 = ans[:]
            ans_1.append("B")
            res, ans_1 = recur(current_a, current_b + 1, current_c - 1, ls[1:], ans_1)
            if res:
                return True, ans_1

            ans.append("C")
            return recur(current_a, current_b - 1, current_c + 1, ls[1:], ans)


def main():
    n, a, b, c = map(int, input().split())
    s_ls = []
    for i in range(n):
        s_ls.append(input())

    ans = []
    res, ans = recur(a, b, c, s_ls, ans)
    if res:
        print("Yes")
        for x in ans:
            print(x)
    else:
        print("No")


main()


### FIXED CODE ###

def solve(n, a, b, c, s_ls):
    ans = []
    for i in range(n):
        s = s_ls[i]
        if s == "AB":
            if a == 0 and b == 0:
                return False, []
            elif a == 0:
                ans.append("A")
                a += 1
                b -= 1
            elif b == 0:
                ans.append("B")
                a -= 1
                b += 1
            elif a == b == 1 and c == 0:
                if i == n - 1:
                    ans.append("A")
                    a += 1
                    b -= 1
                else:
                    nex = s_ls[i + 1]
                    if nex == "BC":
                        ans.append("B")
                        a -= 1
                        b += 1
                    else:
                        ans.append("A")
                        a += 1
                        b -= 1
            else:
                if a >= b:
                    ans.append("B")
                    a -= 1
                    b += 1
                else:
                    ans.append("A")
                    a += 1
                    b -= 1
        elif s == "BC":
            if b == 0 and c == 0:
                return False, []
            elif c == 0:
                ans.append("C")
                b -= 1
                c += 1
            elif b == 0:
                ans.append("B")
                b += 1
                c -= 1
            elif c == b == 1 and a == 0:
                if i == n - 1:
                    ans.append("C")
                    b -= 1
                    c += 1
                else:
                    nex = s_ls[i + 1]
                    if nex == "AB":
                        ans.append("B")
                        b += 1
                        c -= 1
                    else:
                        ans.append("C")
                        b -= 1
                        c += 1
            else:
                if c >= b:
                    ans.append("B")
                    b += 1
                    c -= 1
                else:
                    ans.append("C")
                    b -= 1
                    c += 1
        elif s == "AC":
            if a == 0 and c == 0:
                return False, []
            elif a == 0:
                ans.append("A")
                a += 1
                c -= 1
            elif c == 0:
                ans.append("C")
                a -= 1
                c += 1
            elif a == c == 1 and b == 0:
                if i == n - 1:
                    ans.append("A")
                    a += 1
                    c -= 1
                else:
                    nex = s_ls[i + 1]
                    if nex == "AB":
                        ans.append("A")
                        a += 1
                        c -= 1
                    else:
                        ans.append("C")
                        a -= 1
                        c += 1
            else:
                if a >= c:
                    ans.append("C")
                    a -= 1
                    c += 1
                else:
                    ans.append("A")
                    a += 1
                    c -= 1
    return True, ans


def main():
    n, a, b, c = map(int, input().split())
    s_ls = []
    for i in range(n):
        s_ls.append(input())

    res, ans = solve(n, a, b, c, s_ls)
    if not res:
        print("No")
    else:
        print("Yes")
        for x in ans:
            print(x)


main()