#include <bits/stdc++.h>
using namespace std;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;

int N, A, B, C;
vector<char> ret;

void dame()
{
    puts("No");
    exit(0);
}

void do_ab()
{
    if (B > 1) ret.emplace_back('A'), A++, B--;
    else if (A > 1) ret.emplace_back('B'), B++, A--;
    else if (B) ret.emplace_back('A'), A++, B--;
    else ret.emplace_back('B'), B++, A--;
}

void do_bc()
{
    if (C > 1) ret.emplace_back('B'), B++, C--;
    else if (B > 1) ret.emplace_back('C'), C++, B--;
    else if (C) ret.emplace_back('B'), B++, C--;
    else ret.emplace_back('C'), C++, B--;
}

void do_ac()
{
    if (C > 1) ret.emplace_back('A'), A++, C--;
    else if (A > 1) ret.emplace_back('C'), C++, A--;
    else if (C) ret.emplace_back('A'), A++, C--;
    else ret.emplace_back('C'), C++, A--;
}

int main()
{
    cin >> N >> A >> B >> C;
    assert(N > 0 and N <= 100000);
    assert(A >= 0 and A <= 1000000000);
    assert(B >= 0 and B <= 1000000000);
    assert(C >= 0 and C <= 1000000000);

    vector<string> Q(N);
    for (auto &s : Q)
    {
        cin >> s;
        assert(s == "AB" or s == "BC" or s == "AC");
    }
    for (int i = 0; i < N; i++)
    {
        if (Q[i] == "AB" and !A and !B) dame();
        if (Q[i] == "BC" and !B and !C) dame();
        if (Q[i] == "AC" and !A and !C) dame();

        if (Q[i] == "AB")
        {
            if (A == 1 and B == 1 and i < N - 1)
            {
                if (Q[i + 1] == Q[i]) do_ab();
                else
                {
                    if (Q[i + 1] == "BC")
                    {
                        ret.emplace_back('B');
                        B++, A--;
                    }
                    else
                    {
                        ret.emplace_back('A');
                        A++, B--;
                    }
                }
            }
            else do_ab();
        }
        if (Q[i] == "BC")
        {
            if (B == 1 and C == 1 and i < N - 1)
            {
                if (Q[i + 1] == Q[i]) do_bc();
                else
                {
                    if (Q[i + 1] == "AC")
                    {
                        ret.emplace_back('C');
                        C++, B--;
                    }
                    else
                    {
                        ret.emplace_back('B');
                        B++, C--;
                    }
                }
            }
            else do_bc();
        }
        if (Q[i] == "AC")
        {
            if (A == 1 and C == 1 and i < N - 1)
            {
                if (Q[i + 1] == Q[i]) do_ac();
                else
                {
                    if (Q[i + 1] == "BC")
                    {
                        ret.emplace_back('C');
                        C++, A--;
                    }
                    else
                    {
                        ret.emplace_back('A');
                        A++, C--;
                    }
                }
            }
            else do_ac();
        }
    }
    cout << "Yes\n";
    for (auto x : ret) cout << x << '\n';
}


Measured memory_bytes: 6692