#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
typedef long long int ll;

#define PI (acos(-1))
#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumparr(x) cerr << #x ; for(auto elem: x){cerr << " " << elem;} cerr << endl;
#define dumppairs(x) cerr << #x ; for(auto elem: x){cerr << "(" << elem.first << " " << elem.second << ") ";} cerr << endl;
#define dumpline cerr << "**********************" << endl;
#define dumpwline(x) cerr << "******** " << #x << "=" << (x) << " ********" << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))

ll a; ll b; ll c;

vector <string> ans;
void AC(void){
    a++; c--;
    ans.push_back("A");
}
void CA(void){
    a--; c++;
    ans.push_back("C");
}
void AB(void){
    a++; b--;
    ans.push_back("A");
}
void BA(void){
    a--; b++;
    ans.push_back("B");
}
void BC(void){
    b++; c--;
    ans.push_back("B");
}
void CB(void){
    b--; c++;
    ans.push_back("C");
}
void ext(void){
    cout << "No" << endl;
    REP(i, ans.size()){
        dump(ans[i])
    }
    exit(0);
}


int main(void){
    ll n; cin >> n;
    cin >> a >> b >> c;
    vector <ll> orders;
    REP(i, n) {
        string s;
        cin >> s;
        if (s == "AB"){
            orders.push_back(2);
        } else if (s == "BC"){
            orders.push_back(0);
        } else {
            orders.push_back(1);
        }
    }
    orders.push_back(-1);
    REP(i, n){
        if ((a < 0) or (b < 0) or (c < 0)){
            exit(1);
        }
        if (orders[i] == 0){ // BC
            if (b+c == 0){ext();}
            if (b==0){
                BC();
            } else if (c==0){
                CB();
            } else if (b+c==2){
                if (orders[i+1] == 1){ ///AC
                    CB();
                } else {
                    BC();
                }
            } else {
                if (c<b){
                    CB();
                } else {
                    BC();
                }
            }
        } else if (orders[i] == 1){ // AC
            if (a+c == 0){ext();}
            if (a==0){
                AC();
            } else if (c==0){
                CA();
            } else if (a+c==2){
                if (orders[i+1] == 2){ ///AB
                    AC();
                } else {
                    CA();
                }
            } else {
                if (a<c){
                    AC();
                } else {
                    CA();
                }
            }
        } else { // AB
            if (b+a == 0){ext();}
            if (b==0){
                BA();
            } else if (a==0){
                AB();
            } else if (a+b==2){
                if (orders[i + 1] == 0) { ///BC
                    BA();
                } else {
                    AB();
                }
            } else {
                if (a<b){
                    AB();
                } else {
                    BA();
                }
            }
        }
    }
    cout << "Yes" << endl;
    REP(i, n){
        cout << ans[i] << endl;
    }
    return 0;
}

Measured memory_bytes: 8244