#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fi first
#define se second
#define pb push_back
template<class T> inline int chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline int chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF = 1<<29;
const ll LINF = 1LL<<58;

void solve() {
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    string s, ans = "";
    if (a + b + c == 0) {
        cout << "No" << endl;
        return;
    }
    if (a + b + c == 1) {
        rep(i, n) {
            cin >> s;
            if (s == "AB") {
                if (a == 0 && b == 0) {
                    cout << "No" << endl;
                    return;
                }
                else {
                    if (a) {
                        a--;
                        b++;
                        ans += "B";
                    } else {
                        a++;
                        b--;
                        ans += "A";
                    }
                }
            }
            if (s == "BC") {
                if (c == 0 && b == 0) {
                    cout << "No" << endl;
                    return;
                }
                else {
                    if (c) {
                        c--;
                        b++;
                        ans += "B";
                    } else {
                        c++;
                        b--;
                        ans += "C";
                    }
                }
            }
            if (s == "AC") {
                if (a == 0 && c == 0) {
                    cout << "No" << endl;
                    return;
                }
                else {
                    if (a) {
                        a--;
                        c++;
                        ans += "C";
                    } else {
                        a++;
                        c--;
                        ans += "A";
                    }
                }
            }
        }
        cout << "Yes" << endl;
        rep(i, n) cout << ans[i] << endl;
        return;
    }

    vector<pair<char, char>> ss;

    rep(i, n) {
        cin >> s;
        if (i == 0){
            if (s == "AB" && a == 0 && b == 0) {
                cout << "No" << endl; return;
            }
            if (s == "BC" && c == 0 && b == 0) {
                cout << "No" << endl; return;
            }
            if (s == "AC" && a == 0 && c == 0) {
                cout << "No" << endl; return;
            }
        }
        if (s == "AB") {
            if (a == 0 && b == 0) {
                char pre = ss.back().se, ano = ss.back().fi;
                if (pre == 'A') a -= 2;
                if (pre == 'B') b -= 2;
                if (pre == 'C') c -= 2;
                if (ano == 'A') a += 2;
                if (ano == 'B') b += 2;
                if (ano == 'C') c += 2;
                ss.back() = {pre, ano};
            }
            if (a) {
                a--;
                b++;
                ss.pb({'A', 'B'});
            } else {
                a++;
                b--;
                ss.pb({'B', 'A'});
            }
        }
        if (s == "BC") {
            if (c == 0 && b == 0) {
                char pre = ss.back().se, ano = ss.back().fi;
                if (pre == 'A') a -= 2;
                if (pre == 'B') b -= 2;
                if (pre == 'C') c -= 2;
                if (ano == 'A') a += 2;
                if (ano == 'B') b += 2;
                if (ano == 'C') c += 2;
                ss.back() = {pre, ano};
            }
            if (c) {
                c--;
                b++;
                ss.pb({'C', 'B'});
            } else {
                c++;
                b--;
                ss.pb({'B', 'C'});
            }
        }
        if (s == "AC") {
            if (a == 0 && c == 0) {
                char pre = ss.back().se, ano = ss.back().fi;
                if (pre == 'A') a -= 2;
                if (pre == 'B') b -= 2;
                if (pre == 'C') c -= 2;
                if (ano == 'A') a += 2;
                if (ano == 'B') b += 2;
                if (ano == 'C') c += 2;
                ss.back() = {pre, ano};
            }
            if (a) {
                a--;
                c++;
                ss.pb({'A', 'C'});
            } else {
                a++;
                c--;
                ss.pb({'C', 'A'});
            }
        }
    }
    cout << "Yes" << endl;
    rep(i, n) cout << ss[i].se << endl;
    return;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    solve();
    return 0;
}


Measured memory_bytes: 3768