#include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n)-1;i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(b)-1;i>=(a);--i)
#define ALL(a) a.begin(),a.end()
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;
const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;
template <typename T1, typename T2>
bool chmax(T1 &a, const T2 &b) {
    if (a < b) { a = b; return true; }
    return false;
}
template <typename T1, typename T2>
bool chmin(T1 &a, const T2 &b) {
    if (a > b) { a = b; return true; }
    return false;
}
template<typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    os << "[";
    REP(i, SZ(v)) {
        if (i) os << ", ";
        os << v[i];
    }
    return os << "]";
}
template<typename T1, typename T2>
ostream &operator<<(ostream &os, const map<T1, T2> &mp) {
    os << "{";
    int a = 0;
    for (auto &tp : mp) {
        if (a) os << ", ";
        a = 1;
        os << tp;
    }
    return os << "}";
}
template<typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
    os << p.first << ":" << p.second;
    return os;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    int N, A, B, C; cin >> N >> A >> B >> C;
    vector<string> Q(N);
    REP(i, N) cin >> Q[i];

    if (A + B + C == 0) {
        cout << "No" << endl;
        return 0;
    }

    bool valid = true;
    if (A + B + C == 1) {
        vector<char> ans;
        for (string s : Q) {
            if (s == "AB") {
                if (A == 0 and B == 0) valid = false;
                else if (A == 0) {
                    ++A, --B;
                    ans.push_back('A');
                }
                else {
                    --A, ++B;
                    ans.push_back('B');
                }
            }
            if (s == "BC") {
                if (B == 0 and C == 0) valid = false;
                else if (B == 0) {
                    ++B, --C;
                    ans.push_back('B');
                }
                else {
                    --B, ++C;
                    ans.push_back('C');
                }
            }
            if (s == "AC") {
                if (C == 0 and A == 0) valid = false;
                else if (C == 0) {
                    ++C, --A;
                    ans.push_back('C');
                }
                else {
                    --C, ++A;
                    ans.push_back('A');
                }
            }
        }
        if (!valid) {
            cout << "No" << endl;
        } else {
            cout << "Yes" << endl;
            REP(i, N) {
                cout << ans[i] << endl;
            }
        }
        return 0;
    }

    if (Q[0] == "AB" and A == 0 and B == 0) {
        cout << "No" << endl;
        return 0;
    }
    if (Q[0] == "BC" and B == 0 and C == 0) {
        cout << "No" << endl;
        return 0;
    }
    if (Q[0] == "AC" and C == 0 and A == 0) {
        cout << "No" << endl;
        return 0;
    }

    vector<char> ans(N);
    REP(i, N) {
        if (Q[i] == "AB") {
            if (A == 0) {
                ans[i] = 'A';
                ++A, --B;
            } else if (B == 0) {
                ans[i] = 'B';
                ++B, --A;
            } else if (i == N-1 or Q[i+1] == "AB") {
                ans[i] = 'A';
                ++A, --B;
            } else {
                if (Q[i+1] == "BC") {
                    ans[i] = 'B';
                    ++B, --A;
                }
                else {
                    ans[i] = 'A';
                    ++A, --B;
                }
            }
        }
        if (Q[i] == "BC") {
            if (B == 0) {
                ans[i] = 'B';
                ++B, --C;
            } else if (C == 0) {
                ans[i] = 'C';
                ++C, --B;
            } else if (i == N-1 or Q[i+1] == "BC") {
                ans[i] = 'B';
                ++B, --C;
            } else {
                if (Q[i+1] == "AC") {
                    ans[i] = 'C';
                    ++C, --B;
                }
                else {
                    ans[i] = 'B';
                    ++B, --C;
                }
            }
        }
        if (Q[i] == "AC") {
            if (C == 0) {
                ans[i] = 'C';
                ++C, --A;
            } else if (A == 0) {
                ans[i] = 'A';
                ++A, --C;
            } else if (i == N-1 or Q[i+1] == "AC") {
                ans[i] = 'C';
                ++C, --A;
            } else {
                if (Q[i+1] == "AB") {
                    ans[i] = 'A';
                    ++A, --C;
                }
                else {
                    ans[i] = 'C';
                    ++C, --A;
                }
            }
        }
    }

    cout << "Yes" << endl;
    REP(i, N) {
        cout << ans[i] << endl;
    }

    return 0;
}


Measured memory_bytes: 6644