#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n, a, b, c = LI()
s = [input() for _ in range(n)]
if a == 0 and b == 0 and c == 0:
    print('No')
    quit()
if a == 0 and b == 0 and c == 2:
    if s[0] == 'AB':
        print('No')
        quit()
if a == 0 and b == 2 and c == 0:
    if s[0] == 'AC':
        print('No')
        quit()
if a == 2 and b == 0 and c == 0:
    if s[0] == 'BC':
        print('No')
        quit()

ans = []
for i in range(n):
    if s[i] == 'AB':
        if a < b:
            a += 1
            b -= 1
            ans.append('A')
        elif a == b:
            if a == 0:
                print('No')
                quit()
            elif a == 1:
                if i < n-1:
                    if s[i+1] == 'AC':
                        a += 1
                        b -= 1
                        ans.append('A')
                    else:
                        b += 1
                        a -= 1
                        ans.append('B')
                else:
                    b += 1
                    a -= 1
                    ans.append('B')
            else:
                b += 1
                a -= 1
                ans.append('B')
        else:
            a -= 1
            b += 1
            ans.append('B')
    elif s[i] == 'AC':
        if a < c:
            a += 1
            c -= 1
            ans.append('A')
        elif a == c:
            if a == 0:
                print('No')
                quit()
            elif a == 1:
                if i < n-1:
                    if s[i+1] == 'BC':
                        c += 1
                        a -= 1
                        ans.append('C')
                    else:
                        a += 1
                        c -= 1
                        ans.append('A')
                else:
                    a += 1
                    c -= 1
                    ans.append('A')
            else:
                a += 1
                c -= 1
                ans.append('A')
        else:
            a -= 1
            c += 1
            ans.append('C')
    elif s[i] == 'BC':
        if b < c:
            b += 1
            c -= 1
            ans.append('B')
        elif b == c:
            if b == 0:
                print('No')
                quit()
            elif b == 1:
                if i < n-1:
                    if s[i+1] == 'AC':
                        c += 1
                        b -= 1
                        ans.append('C')
                    else:
                        b += 1
                        c -= 1
                        ans.append('B')
                else:
                    b += 1
                    c -= 1
                    ans.append('B')
            else:
                b += 1
                c -= 1
                ans.append('B')
        else:
            b -= 1
            c += 1
            ans.append('C')
print('Yes')
for i in ans:
    print(i)
                 



Measured memory_bytes: 90064