//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <vector>
#include <map>
#include <queue>

using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<n;++i)
#define mod (ll)(1e9+7)
#define FIX(a) ((a)%mod+mod)%mod
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define fi first
#define se second
#define pb push_back
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n,a,b,c;
    cin >> n >> a >> b >> c;
    vll id(n+1,0); // AB0 BC1 CA2
    vll ans(n);
    string ab = "AB", bc = "BC", ca = "CA";
    REP(i,n){
        string s;
        cin >> s;
        if(s=="AB"){
            id[i]=0;
        }else if(s=="BC"){
            id[i]=1;
        }else if(s=="AC"){
            id[i]=2;
        }
    }
    if(a==0&&b==0&&c==0){
        cout << "No" << endl;
        return 0;
    }else if(a+b+c==2){
        REP(i,n){
            if(id[i]==0){
                if(a+b==0){
                    cout << "No" << endl;
                    return 0; 
                }else if(a==0){
                    a++;
                    b--;
                    ans[i]=0;
                }else if(b==0){
                    a--;
                    b++;
                    ans[i]=1;
                }else{
                    if(id[i+1]==1){
                        b++;
                        a--;
                        ans[i]=1;
                    }else{
                        a++;
                        b--;
                        ans[i]=0;
                    }
                }
            }else if(id[i]==1){
                 if(b+c==0){
                    cout << "No" << endl;
                    return 0; 
                }else if(c==0){
                    c++;
                    b--;
                    ans[i]=2;
                }else if(b==0){
                    c--;
                    b++;
                    ans[i]=1;
                }else{
                    if(id[i+1]==0){
                        b++;
                        c--;
                        ans[i]=1;
                    }else{
                        c++;
                        b--;
                        ans[i]=2;
                    }
                }
            }else{
                 if(a+c==0){
                    cout << "No" << endl;
                    return 0; 
                }else if(a==0){
                    a++;
                    c--;
                    ans[i]=0;
                }else if(c==0){
                    a--;
                    c++;
                    ans[i]=2;
                }else{
                    if(id[i+1]==1){
                        c++;
                        a--;
                        ans[i]=2;
                    }else{
                        a++;
                        c--;
                        ans[i]=0;
                    }

                }
            }
        }
    }else{
        REP(i,n){
            if(id[i]==0){
                if(a+b==0){
                    cout << "No" << endl;
                    return 0;
                }else if(a>=b){
                    a--;
                    b++;
                    ans[i] = 1;
                }else{
                    a++;
                    b--;
                    ans[i] = 0;
                }
            }else if(id[i]==1){
                if(c+b==0){
                    cout << "No" << endl;
                    return 0;
                }else if(c>=b){
                    c--;
                    b++;
                    ans[i] = 1;
                }else{
                    c++;
                    b--;
                    ans[i] = 2;
                }
            }else if(id[i]==2){
                if(a+c==0){
                    cout << "No" << endl;
                    return 0;
                }else if(a>=c){
                    a--;
                    c++;
                    ans[i] = 2;
                }else{
                    a++;
                    c--;
                    ans[i] = 0;
                }
            }
        }
    }
    cout << "Yes" << endl;
    REP(i,n){
        if(ans[i]==0){
            cout << "A" << endl;
        }else if(ans[i]==1){
            cout << "B" << endl;
        }else{
            cout << "C" << endl;
        }
    }
    return 0;
}

Measured memory_bytes: 4736