import std;

// dfmt off
T lread(T=long)(){return readln.chomp.to!T;}
T[] lreads(T=long)(long n){return generate(()=>readln.chomp.to!T()).take(n).array;}
T[] aryread(T=long)(){return readln.split.to!(T[]);}
void arywrite(T=long)(T[] ary){ary.map!(text).join(' ').writeln;}
void scan(TList...)(ref TList Args){auto line = readln.split;
foreach (i,T;TList){T val=line[i].to!(T);Args[i]=val;}}
void dprint(TList...)(TList Args){debug{auto s=new string[](TList.length);
static foreach(i,a;Args) s[i]=text(a);s.map!(text).join(' ').writeln;}}
alias sread=()=>readln.chomp();enum MOD =10^^9+7;
alias PQueue(T,alias less="a<b") = BinaryHeap!(Array!T,less);
// dfmt on

void main()
{
    long N, A, B, C;
    scan(N, A, B, C);
    auto S = new string[](N);
    foreach (i; 0 .. N)
        S[i] = sread();
    if (A + B + C == 0)
    {
        writeln("No");
        return;
    }
    auto ABC = [A, B, C];
    string[] ans;
    foreach (i; 0 .. N)
    {
        if (ABC[S[0][0] - 'A'] + ABC[S[0][1] - 'A'] == 0)
        {
            writeln("No");
            return;
        }
        if (ABC[S[i][0] - 'A'] == 0)
        {
            ABC[S[i][0] - 'A']++;
            ABC[S[i][1] - 'A']--;
            ans ~= text(S[i][0]);
            continue;
        }
        if (ABC[S[i][1] - 'A'] == 0)
        {
            ABC[S[i][0] - 'A']--;
            ABC[S[i][1] - 'A']++;
            ans ~= text(S[i][1]);
            continue;
        }
        if (ABC[S[i][0] - 'A'] == 1 && ABC[S[i][1] - 'A'] == 1)
        {
            if (i + 1 < N)
            {
                if (ABC[S[i][0] - 'A'] == ABC[S[i + 1][0] - 'A']
                        || ABC[S[i][0] - 'A'] == ABC[S[i + 1][1] - 'A'])
                {
                    ABC[S[i][0] - 'A']++;
                    ABC[S[i][1] - 'A']--;
                    ans ~= text(S[i][0]);
                    continue;
                }
                else
                {
                    ABC[S[i][0] - 'A']--;
                    ABC[S[i][1] - 'A']++;
                    ans ~= text(S[i][1]);
                    continue;
                }
            }
            ans ~= text(S[i][0] - 'A');
            continue;
        }
        ABC[S[i][0] - 'A']++;
        ABC[S[i][1] - 'A']--;
        ans ~= text(S[i][0]);
    }
    writeln("Yes");
    foreach (a; ans)
        writeln(a);
}
