#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;

#define mp make_pair
#define pb push_back
#define pf push_front
#define ss second
#define ff first
#define sz(x) (int)x.size()
#define newl "\n"
#define mem(x, val) memset(x, val, sizeof(x))
#define fastio                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL)
#define all(v) (v).begin(), (v).end()

const ld pi = 3.14159265359;
ll INF = 1e18 + 10;
ll MOD = 998244353;
ll mod = 1e9 + 7;

inline ll add(ll a, ll b, ll m)
{
    if ((a + b) >= m)
        return (a + b) % m;
    return a + b;
}

inline ll mul(ll a, ll b, ll m)
{
    if ((a * b) < m)
        return a * b;
    return (a * b) % m;
}

ll power(ll x, ll y, ll m)
{
    ll res = 1;
    x = x % m;
    if (x == 0)
        return 0;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % m;
        y = y >> 1;
        x = (x * x) % m;
    }
    return res;
}

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

void solve()
{
    ll n,a,b,c;
    cin>>n>>a>>b>>c;
    vector<char> v;
    vector<string> vs(n);
    for(int i=0;i<n;i++) {
        cin>>vs[i];
    }
    for(int i=0;i<n;i++) {
        if(vs[i]=="AB") {
            if((a==0&&b==0)||c<0) {
                cout<<"No";
                return;
            }
            if(i<n-1&&a==1&&b==1&&c==0) {
                if(vs[i+1]=="BC") {
                    b++;
                    a--;
                    v.pb('B');
                }
                else {
                    a++;
                    b--;
                    v.pb('A');
                }
            }
            else if(a>b) {
                a--;
                b++;
                v.pb('B');
            }
            else {
                a++;
                b--;
                v.pb('A');
            }
        }
        if(vs[i]=="AC") {
            if ((a == 0 && c==0)||b<0)
            {
                cout << "No";
                return;
            }
            if (i < n - 1 && a == 1 && c == 1 && b == 0)
            {
                if (vs[i + 1] == "BC")
                {
                    c++;
                    a--;
                    v.pb('C');
                }
                else
                {
                    a++;
                    c--;
                    v.pb('A');
                }
            }
            else if(a>c) {
                a--;
                c++;
                v.pb('C');
            }
            else {
                a++;
                c--;
                v.pb('A');
            }
        }
        if(vs[i]=="BC") {
            if ((c == 0 && b==0) || a<0)
            {
                cout << "No";
                return;
            }
            if (i < n - 1 && c == 1 && b == 1 && a == 0)
            {
                if (vs[i + 1] == "AC")
                {
                    c++;
                    b--;
                    v.pb('C');
                }
                else
                {
                    b++;
                    c--;
                    v.pb('B');
                }
            }
            else if(b>c) {
                b--;
                c++;
                v.pb('C');
            }
            else {
                b++;
                c--;
                v.pb('B');
            }
        }
    }
    cout<<"Yes"<<newl;
    for(int i=0;i<n;i++) {
        cout<<v[i]<<newl;
    }
}

int main()
{
    fastio;
    int t;
    t = 1;
    //cin >> t;
    //int test=t;
    while (t-- > 0)
    {
        //cout<<"Case #"<<(test-t)<<": ";
        solve();
        //cout<<newl;
    }

    return 0;
}

Measured memory_bytes: 6652