#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
typedef unsigned long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

const long long INF = 1e18;
//const ll mod = 1000000007;
ll N, A, B, C;
vector<string> S;
string ans;

void solve1() {
    for(int i = 0; i < N; i++) {
        if(S[i] == "AB") {
            if(A) {
                A--;
                B++;
                ans.push_back('B');
            } else if(B) {
                B--;
                A++;
                ans.push_back('A');
            } else {
                cout << "No" << endl;
                return;
            }
        }
        if(S[i] == "AC") {
            if(A) {
                A--;
                C++;
                ans.push_back('C');
            } else if(C) {
                C--;
                A++;
                ans.push_back('A');
            } else {
                cout << "No" << endl;
                return;
            }
        }
        if(S[i] == "BC") {
            if(B) {
                B--;
                C++;
                ans.push_back('C');
            } else if(C) {
                C--;
                B++;
                ans.push_back('B');
            } else {
                cout << "No" << endl;
                return;
            }
        }
    }
    cout << "Yes" << endl;
    for(auto c : ans) cout << c << endl;
}

void f(int idx) {
    if(S[idx] == "AB") {
        if(idx < N - 1 and A and B) {
            if(S[idx+1] != "BC") {
                A++;
                B--;
                ans.push_back('A');
            } else {
                A--;
                B++;
                ans.push_back('B');
            }
        } else {
            if(A) {
                A--;
                B++;
                ans.push_back('B');
            } else {
                A++;
                B--;
                ans.push_back('A');
            }
        }
    }
    if(S[idx] == "AC") {
        if(idx < N - 1 and A and C) {
            if(S[idx+1] != "BC") {
                A++;
                C--;
                ans.push_back('A');
            } else {
                A--;
                C++;
                ans.push_back('C');
            }
        } else {
            if(A) {
                A--;
                C++;
                ans.push_back('C');
            } else {
                A++;
                C--;
                ans.push_back('A');
            }
        }
    }
    if(S[idx] == "BC") {
        if(idx < N - 1 and B and C) {
            if(S[idx+1] != "AC") {
                B++;
                C--;
                ans.push_back('B');
            } else {
                B--;
                C++;
                ans.push_back('C');
            }
        } else {
            if(B) {
                B--;
                C++;
                ans.push_back('C');
            } else {
                B++;
                C--;
                ans.push_back('B');
            }
        }
    }
}

int main() {
    cin >> N >> A >> B >> C;
    S.resize(N);
    for(int i = 0; i < N; i++) {
        cin >> S[i];
    }
    if(A + B + C == 0) {
        cout << "No" << endl;
        return 0;
    }
    if(A + B + C == 1) {
        solve1();
        return 0;
    }
    if(S[0] == "AB" and A == 0 and B == 0) {
        cout << "No" << endl;
        return 0;
    }
    if(S[0] == "BC" and B == 0 and C == 0) {
        cout << "No" << endl;
        return 0;
    }
    if(S[0] == "AC" and A == 0 and C == 0) {
        cout << "No" << endl;
        return 0;
    }
    cout << "Yes" << endl;
    for(int i = 0; i < N; i++) {
        f(i);
    }
    for(auto c : ans) cout << c << endl;
    return 0;
}

Measured memory_bytes: 6668