#include <bits/stdc++.h>
#define REP(i,s,e) for(int i=(s); i<(e);i++)
#define rep(i,n) REP(i,0,n)
#define rep1(i,n) REP(i,1,n)
#define repe(i,n) for(auto &&i:n)
#define all(v) (v).begin(),(v).end()
#define decimal fixed<<setprecision(20)
#define fastcin() cin.tie(0);ios::sync_with_stdio(false)
#define int long long
using LL = long long;
using namespace std;
using Graph = vector<vector<int>>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF = 1e9;
const LL LLINF = 1e16;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

signed main(){
    fastcin();

    int n, a, b, c;
    cin >> n >> a >> b >> c;
    vector<string> s(n);
    rep(i, n) cin >> s[i];

    vector<char> ans(n, '0');
    rep(i, n){
        if(s[i] == "AB"){
            if(a == 0 && b == 0){
                cout << "No" << endl;
                return 0;
            }else if(a == 0){
                a++;
                b--;
                ans[i] = 'A';
            }else if(b == 0){
                b++;
                a--;
                ans[i] = 'B';
            }else if(a==1 && b==1 && c==0){
                if(i == n-1 || s[i+1] == "AB"){
                    a++;
                    b--;
                    ans[i] = 'A';
                }else{
                    if(s[i+1] == "AC"){
                        a++;
                        b--;
                        ans[i] = 'A';
                    }else{
                        b++;
                        a--;
                        ans[i] = 'B';
                    }
                }
            }else{
                if(a<b){
                    a++;
                    b--;
                    ans[i] = 'A';
                }else{
                    b++;
                    a--;
                    ans[i] = 'B';
                }
            }
        }else if(s[i] == "AC"){
            if(a == 0 && c == 0){
                cout << "No" << endl;
                return 0;
            }else if(a == 0){
                a++;
                c--;
                ans[i] = 'A';
            }else if(c == 0){
                c++;
                a--;
                ans[i] = 'C';
            }else if(a==1 && c==1 && b==0){
                if(i == n-1 || s[i+1] == "AC"){
                    a++;
                    c--;
                    ans[i] = 'A';
                }else{
                    if(s[i+1] == "AB"){
                        a++;
                        c--;
                        ans[i] = 'A';
                    }else{
                        c++;
                        a--;
                        ans[i] = 'C';
                    }
                }
            }else{
                if(a<c){
                    a++;
                    c--;
                    ans[i] = 'A';
                }else{
                    c++;
                    a--;
                    ans[i] = 'C';
                }
            }
        }else{
            if(c == 0 && b == 0){
                cout << "No" << endl;
                return 0;
            }else if(c == 0){
                c++;
                b--;
                ans[i] = 'C';
            }else if(b == 0){
                b++;
                c--;
                ans[i] = 'B';
            }else if(c==1 && b==1 && a==0){
                if(i == n-1 || s[i+1] == "BC"){
                    c++;
                    b--;
                    ans[i] = 'C';
                }else{
                    if(s[i+1] == "AB"){
                        b++;
                        c--;
                        ans[i] = 'B';
                    }else{
                        c++;
                        b--;
                        ans[i] = 'C';
                    }
                }
            }else{
                if(c<b){
                    c++;
                    b--;
                    ans[i] = 'C';
                }else{
                    b++;
                    c--;
                    ans[i] = 'B';
                }
            }
        }
    }

    cout << "Yes" << endl;
    rep(i, n){
        if(ans[i] == '0') return 1;
        cout << ans[i] << endl;
    }
}

Measured memory_bytes: 6632