#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <iomanip>
using ll = long long;
using uint = unsigned int;
using graph = std::vector<std::vector<ll>>;
using wGraph = std::vector<std::vector<std::pair<ll,ll>>>;
#define rep(i,n) for (int i=0; i < int(n); i++)

using namespace std;
ll MOD7 = 1000000007;
ll MOD9 = 1000000009;
vector<ll> InputVec(ll N){
    vector<ll> A(N);
    for (int i = 0; i < N; ++i) {
        cin >> A[i];
    }
    return A;
}
void OutputVec(vector<ll> A){
    for (int i = 0; i < A.size(); ++i) {
        cout << A[i] << ",";
    }
    cout << endl;
}
vector<vector<ll>> InputVec2d(ll H,ll W){
    vector<vector<ll>> A(H);
    for (int yi = 0; yi < H; ++yi) {
        A[yi] = vector<ll>(W);
    }
    for (int yi = 0; yi < H; ++yi) {
        for (int xi = 0; xi < W; ++xi) {
            cin >> A[yi][xi];
        }
    }
    return A;
}
vector<vector<char>> InputVec2dStr(ll H,ll W){
    vector<vector<char>> A(H);
    for (int yi = 0; yi < H; ++yi) {
        A[yi] = vector<char>(W);
    }
    for (int yi = 0; yi < H; ++yi) {
        string S;
        cin >> S;
        for (int xi = 0; xi < W; ++xi) {
            A[yi][xi] = S[xi];
        }
    }
    return A;
}
void OutputVec2d(vector<vector<ll>> A){
    for (int yi = 0; yi < A.size(); ++yi) {
        for (int xi = 0; xi < A[yi].size(); ++xi) {
            cout << A[yi][xi] << ",";
        }
        cout << endl;
    }
}
graph InputGraph(ll N,ll M){
    graph G(N);
    for (int i = 0; i < M; ++i) {
        ll a,b;
        cin >> a >> b;
        a--;b--;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    return G;
}
graph InputDGraph(ll N,ll M){
    graph G(N);
    for (int i = 0; i < M; ++i) {
        ll a,b;
        cin >> a >> b;
        a--;b--;
        G[a].push_back(b);
    }
    return G;
}
void OutputGraph(graph G){
    for (int i = 0; i < G.size(); ++i) {
        cout << i << ":";
        for (int j = 0; j < G[i].size(); ++j) {
            cout << G[i][j]<< ",";
        }
        cout << endl;
    }
}
void OutputAnswerBool(bool b,bool isUpperCase = false){
    if(b){
        if(isUpperCase){
            cout << "YES" << endl;
        }else{
            cout << "Yes" << endl;
        }
    }else{
        if(isUpperCase){
            cout << "NO" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

int main() {
    ll N,A,B,C;
    cin >> N >> A >> B >> C;
    vector<ll> q;
    for (int i = 0; i < N; ++i) {
        string s;
        cin >> s;
        if(s == "AB"){
            q.push_back(0);
        }else if(s=="BC"){
            q.push_back(1);
        }else{
            q.push_back(2);
        }
    }
    vector<char> ans;
    for (int i = 0; i < N; ++i) {
        switch (q[i]) {
            case 0:
                if(A == B){
                    if(A == 0){
                        cout << "No" << endl;
                        return 0;
                    }
                    if(i == N-1){
                        A++;B--;
                        ans.push_back('A');
                    }else{
                        if(C == 0){
                            if(q[i+1] == 1){
                                A--;B++;
                                ans.push_back('B');
                            }else if(q[i+1] == 2){
                                A++;B--;
                                ans.push_back('A');
                            }else{
                                A++;B--;
                                ans.push_back('A');
                            }
                        }else{
                            A++;B--;
                            ans.push_back('A');
                        }
                    }
                }else{
                    if(A > B){
                        A--;B++;
                        ans.push_back('B');
                    }else{
                        A++;B--;
                        ans.push_back('A');
                    }
                }
                break;

            case 1:
                if(B == C){
                    if(B == 0){
                        cout << "No" << endl;
                        return 0;
                    }
                    if(i == N-1){
                        B++;C--;
                        ans.push_back('B');
                    }else{
                        if(A == 0){
                            if(q[i+1] == 2){
                                B--;C++;
                                ans.push_back('C');
                            }else if(q[i+1] == 0){
                                C--;B++;
                                ans.push_back('B');
                            }else{
                                B++;C--;
                                ans.push_back('B');
                            }
                        }else{
                            B++;C--;
                            ans.push_back('B');
                        }
                    }
                }else{
                    if(B > C){
                        B--;C++;
                        ans.push_back('C');
                    }else{
                        B++;C--;
                        ans.push_back('B');
                    }
                }
                break;

            case 2:
                if(C == A){
                    if(C == 0){
                        cout << "No" << endl;
                        return 0;
                    }
                    if(i == N-1){
                        C++;A--;
                        ans.push_back('C');
                    }else{
                        if(B == 0){
                            if(q[i+1] == 0){
                                C--;A++;
                                ans.push_back('A');
                            }else if(q[i+1] == 1){
                                C++;A--;
                                ans.push_back('C');
                            }else{
                                C++;A--;
                                ans.push_back('C');
                            }
                        }else{
                            C++;A--;
                            ans.push_back('C');
                        }
                    }
                }else{
                    if(C > A){
                        C--;A++;
                        ans.push_back('A');
                    }else{
                        C++;A--;
                        ans.push_back('C');
                    }
                }
                break;

        }
        //cout << A << "," << B << "," << C << endl;
    }
    cout << "Yes" << endl;
    for (int i = 0; i < ans.size(); ++i) {
        cout << ans[i] << endl;
    }



}


Measured memory_bytes: 4308