#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define db(x) (cerr << #x << ": " << (x) << '\n')
#define cps CLOCKS_PER_SEC
#define tests(t) int t; cin >> t; while(t--)
#define iceil(n, x) (((n) + (x) - 1) / (x))
#define eb emplace_back
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define sz size()
#define all(v) (v).begin(), (v).end()
#define uni(v) sort(all(v)), (v).erase(unique(all(v)), (v).end())
#define fi first
#define se second
#define bitcount(x) __builtin_popcount(x)
#define bit(x) (1LL << x)
#define PI acos(-1.0)
#define EPS 1e-9

#define mod 1000000007
#define maxn 200015

using namespace std;

using namespace __gnu_pbds;
template<class key, class cmp = std::less<key>>
using ordered_set = tree<key, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
///All indexing is 0-based
///methods: find_by_order(k); & order_of_key(k);
///To make it an ordered_multiset, use pairs of (value, time_of_insertion)
///to distinguish values which are similar

typedef long long ll;
typedef double ld;
typedef pair<ll, ll> par;


ll N,ins=1,a,b;
char sol[maxn],cad[maxn][4];

struct dos
{
    int v;
    char c;

    bool operator < (const dos &h) const{
        return v<h.v;
    }
}A[10];

int pos(char c)
{
    for(int i=1;i<=3;i++)
        if(c == A[i].c)
            return i;
    return 0;
}

bool simular(int ins)
{
    for(int i=ins;i<=N;i++){
        a = pos(cad[i][0]);
        b = pos(cad[i][1]);
        if(A[a].v == 0 && A[b].v == 0)
            return 0;
        if(A[a].v >A[b].v){
            A[a].v--,A[b].v++ , sol[i] = A[b].c;
            continue;
        }
        if(A[a].v < A[b].v){
            A[a].v++,A[b].v-- , sol[i] = A[a].c;
            continue;
        }

        if(i < N ){
            if(cad[i][0] == cad[i+1][0] && cad[i][1] == cad[i+1][1])
                A[a].v--,A[b].v++ , sol[i] = A[b].c;
            else
                {
                   if(cad[i][0] == cad[i+1][0] || cad[i][0]==cad[i+1][1])
                        A[a].v++,A[b].v-- , sol[i] = A[a].c;
                   else
                        A[a].v--,A[b].v++ , sol[i] = A[b].c;
                }
        }
        else{
            A[a].v--,A[b].v++ , sol[i] = A[b].c;
        }
    }
    return 1;
}
int main()
{
    #ifdef acm
    freopen("a.in","r",stdin);
    #endif // acm
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> N >> A[1].v >> A[2].v >> A[3].v;

    A[1].c = 'A', A[2].c = 'B', A[3].c = 'C';

    sort(A+1,A+1+3);
    for(int i=1;i<=N;i++)
        cin >> cad[i];

    /*if(A[1].v == 0){
        if(A[1].c!= cad[1][0] && A[1].c!=cad[1][0]){
            cout << "No\n";
            return 0;
        }
        A[1].v++;
        sol[1] = A[1].c;
        if(A[1].c==cad[1][0])
             A[pos( cad[1][1] )].v--;
        else
             A[pos( cad[1][0] )].v--;

        ins++;
        sort(A+1,A+1+3);
    }
    if(A[1].v==0){
            cout << "No\n";
            return 0;
    }*/

    bool ok = simular(ins);
    if(!ok)
        cout << "No\n";
    else{
        cout << "Yes\n";
        for(int i=1;i<=N;i++)
            cout << sol[i] << "\n";
    }










}


Measured memory_bytes: 4160