#include <iostream>
#include <vector>

using namespace std;
using ll = long long;

typedef enum{AB,BC,CA}Inst;
typedef enum{A,B,C} Ans;

void print_ans(vector<Ans>& ans){
    cout << "Yes\n";
    for(int i=0; i<ans.size(); i++){
        switch (ans.at(i))
        {
        case A:
            cout << "A\n";
            break;
        case B:
            cout << "B\n";
            break;
        case C:
            cout << "C\n";
            break;
        default:
            break;
        }
    }
}

void F_rec(vector<Inst>& inst, ll depth, ll a, ll b, ll c, vector<Ans>& ans, bool& finished){
    if(depth>=inst.size()){
        finished = true;
        return;
    }
    switch (inst.at(depth)){
    case AB:
        if(a==0 && b>0){
            // A
            ans.push_back(A);
            F_rec(inst, depth+1, a+1, b-1, c+0, ans, finished);
        }else if(b==0 && a>0){
            // B
            ans.push_back(B);
            F_rec(inst, depth+1, a-1, b+1, c+0, ans, finished);
        }else if(a>0 && b>0){
            // A or B
            ans.push_back(A);
            F_rec(inst, depth+1, a+1, b-1, c+0, ans, finished);
            if(!finished){
                ans.pop_back();
                ans.push_back(B);
                F_rec(inst, depth+1, a-1, b+1, c+0, ans, finished);
            }
        }
        return;
    case BC:
        if(b==0 && c>0){
            // B
            ans.push_back(B);
            F_rec(inst, depth+1, a+0, b+1, c-1, ans, finished);
        }else if(c==0 && b>0){
            // C
            ans.push_back(C);
            F_rec(inst, depth+1, a-0, b-1, c+1, ans, finished);
        }else if(b>0 && c>0){
            // B or C
            ans.push_back(B);
            F_rec(inst, depth+1, a+0, b+1, c-1, ans, finished);
            if(!finished){
                ans.pop_back();
                ans.push_back(C);
                F_rec(inst, depth+1, a-0, b-1, c+1, ans, finished);
            }
        }
        return;
    case CA:
        if(a==0 && c>0){
            // A
            ans.push_back(A);
            F_rec(inst, depth+1, a+1, b+0, c-1, ans, finished);
        }else if(c==0 && a>0){
            // C
            ans.push_back(C);
            F_rec(inst, depth+1, a-1, b-0, c+1, ans, finished);
        }else if(a>0 && c>0){
            // A or C
            ans.push_back(A);
            F_rec(inst, depth+1, a+1, b+0, c-1, ans, finished);
            if(!finished){
                ans.pop_back();
                ans.push_back(C);
                F_rec(inst, depth+1, a-1, b-0, c+1, ans, finished);
            }
        }
        return;
    default:
        break;
    }

}

int main(){
    ll N, a, b, c;
    string s;
    cin >> N >> a >> b >> c;
    vector<Inst> inst(N);
    vector<Ans> ans;
    for(int i=0; i<N; i++){
        cin >> s;
        if(s.find("AB")<2){
            inst.at(i) = AB;
        }else if(s.find("BC")<2){
            inst.at(i) = BC;
        }else{
            inst.at(i) = CA;
        }
    }

    bool finished = false;
    F_rec(inst, 0, a, b, c, ans, finished);
    if(finished){
        print_ans(ans);
    }else{
        cout << "No\n";
    }
    return 0;
}



Measured memory_bytes: 15020