#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5+5 , M = 998244353, OO = 0x3f3f3f3f;
typedef long long ll;
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);
const double Pii = 3.14159265359;
ll n, a, b, c, st;
string s[N];
int mem[N][3][3][3];
string ans;
bool go(ll a, ll b, ll c)
{
    if(a && b && c) return 1;
    if(a && b && a+b > 2) return 1;
    if(a && c && a+c > 2) return 1;
    if(c && b && c+b > 2) return 1;
    return 0;
}

void DO(int st)
{
    for(int i=st; i<n; ++i)
    {
        //cout << s[i] << " ";
        if(s[i] == "AB")
        {
            if(a >= b)
            {
                cout << "B" << endl;
                b++;
                a--;
            }
            else
            {
                cout << "A" << endl;
                a++;
                b--;
            }
        }
        else if(s[i] == "AC")
        {
            if(a >= c)
            {
                cout << "C" << endl;
                a--;
                c++;
            }
            else
            {
                cout << "A" << endl;
                a++;
                c--;
            }
        }
        else
        {
            if(c >= b)
            {
                cout << "B" << endl;
                c--;
                b++;
            }
            else
            {
                cout << "C" << endl;
                c++;
                b--;
            }
        }
        //cout << a << " " << b <<" " <<  c << endl;
    }
}

int solve(int idx, int a, int b, int c)
{
    if(idx == n)
    {
        return mem[idx][a][b][c] = 1;
    }
    if(mem[idx][a][b][c] != -1) return mem[idx][a][b][c];
    string tmp = s[idx];
    int op1 = 0, op2 = 0;
    if(tmp == "AB")
    {
        if(a)
        {
            if(solve(idx+1, a-1, b+1, c))
            {
                ans.push_back('B');
                return mem[idx][a][b][c] = 1;
            }
        }
        if(b)
        {
            if(solve(idx+1, a+1, b-1, c))
            {
                ans.push_back('A');
                return mem[idx][a][b][c] = 1;
            }
        }
        return mem[idx][a][b][c] = 0;
    }
    if(tmp == "AC")
    {
        if(a)
        {
            if(solve(idx+1, a-1, b, c+1))
            {
                ans.push_back('C');
                return mem[idx][a][b][c] = 1;
            }
        }
        if(c)
        {
            if(solve(idx+1, a+1, b, c-1))
            {
                ans.push_back('A');
                return mem[idx][a][b][c] = 1;
            }
        }
        return mem[idx][a][b][c] = 0;
    }
    if(tmp == "BC")
    {
        if(b)
        {
            if(solve(idx+1, a, b-1, c+1))
            {
                ans.push_back('C');
                return mem[idx][a][b][c] = 1;
            }
        }
        if(c)
        {
            if(solve(idx+1, a, b+1, c-1))
            {
                ans.push_back('B');
                return mem[idx][a][b][c] = 1;
            }
        }
        return mem[idx][a][b][c] = 0;
    }
}


int main()
{
    FIO
    cin >> n >> a >> b >> c;
    for(int i=0; i<n; ++i) cin >> s[i];
    st = 0;
    if(go(a, b, c))
    {
        cout << "Yes" << endl;
        DO(0);
    }
    else if(!a && !b && !c) cout << "No" << endl;
    else
    {
        if(a+b+c >= 3)
        {
            string tmp = s[0];
            if(tmp == "AB" && c) cout << "No" << endl;
            else if(tmp == "AC" && b) cout << "No" << endl;
            else if(tmp == "BC" && a) cout << "No" << endl;
            else
            {
                cout << "Yes" << endl;
                if(tmp == "AB")
                {
                    if(a)
                    {
                        cout << "B" << endl;
                        a--;
                        b++;
                    }
                    else
                    {
                        cout << "A" << endl;
                        a++;
                        b--;
                    }
                }
                else if(tmp == "AC")
                {
                    if(a)
                    {
                        cout << "C" << endl;
                        a--;
                        c++;
                    }
                    else
                    {
                        cout << "A" << endl;
                        a++;
                        c--;
                    }
                }
                else
                {
                    if(c)
                    {
                        cout << "B" << endl;
                        c--;
                        b++;
                    }
                    else
                    {
                        cout << "C" << endl;
                        c++;
                        b--;
                    }
                }
                DO(1);
            }
        }
        else
        {
            memset(mem, -1, sizeof mem);
            int ok = solve(0, a, b, c);
            if(!ok) cout << "No" << endl;
            else
            {
                cout << "Yes" << endl;
                for(int i=n-1; i>=0; --i) cout << ans[i] << endl;
            }
        }
    }
    return 0;
}
/*
2 0 0 2
AC
AB
*/



Measured memory_bytes: 31476