#include "bits/stdc++.h"
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rep(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

ll n,a,b,c;
vector<string> vs;

ll trs(string s){
    if(s=="AB")return 0;
    if(s=="BC")return 1;
    else return 2;
}

bool chk(ll typ){
    if(typ==0){
        if(a-1>=0 || b-1>=0)return true;
        else return false;
    }else if(typ==1){
        if(b-1>=0 || c-1>=0)return true;
        else return false;
    }else if(typ==2){
        if(a-1>=0 || c-1>=0)return true;
        else return false;
    }else{
        return true;
    }
}

int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(30);
    cin>>n>>a>>b>>c;
    vs.resize(n);
    rep(i,n){
        cin>>vs[i];
    }
    bool flg = true;
    vector<string> ans;
    rep(i,n){
        if(trs(vs[i])==0){
            ll id,id2;
            if(a>=b){
                id = -1;
                id2 = 1;
            }else{
                id= 1;
                id2 = -1;
            }
            a += id;
            b +=id2;
            ll tp=-1;
            if(i!=n-1)tp = trs(vs[i+1]);
            if(!chk(tp)){
                a -= id;
                b -= id2;
                swap(id,id2);
                a += id;
                b += id2;
            }
            if(id>id2){
                ans.pb("A");
            }else{
                ans.pb("B");
            }
        }else if(trs(vs[i])==1){
            ll id,id2;
            if(b>=c){
                id = -1;
                id2 = 1;
            }else{
                id= 1;
                id2 = -1;
            }
            b += id;
            c +=id2;
            ll tp=-1;
            if(i!=n-1)tp = trs(vs[i+1]);
            if(!chk(tp)){
                b -= id;
                c -= id2;
                swap(id,id2);
                b += id;
                c += id2;
            }
            if(id>id2){
                ans.pb("B");
            }else{
                ans.pb("C");
            }
        }else{
            ll id,id2;
            if(a>=c){
                id = -1;
                id2 = 1;
            }else{
                id= 1;
                id2 = -1;
            }
            a += id;
            c +=id2;
            ll tp=-1;
            if(i!=n-1)tp = trs(vs[i+1]);
            if(!chk(tp)){
                a -= id;
                c -= id2;
                swap(id,id2);
                a += id;
                c += id2;
            }
            if(id>id2){
                ans.pb("A");
            }else{
                ans.pb("C");
            }
        }
        if(a<0 || b<0 || c<0){
            flg = false;
        }
        //cout<<a<<" "<<b<<" "<<c<<endl;
    }
    if(flg){
        print("Yes");
        rep(i,ans.size()){
            print(ans[i]);
        }
    }else{
        print("No");
        //print(-1);
    }
    return 0;
}

Measured memory_bytes: 10560