#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--)
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const int ddx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll MOD = 1000000007;
const ll INF = 1000000000000000000L;
#ifdef __DEBUG

/**
 * For DEBUG
 * https://github.com/ta7uw/cpp-pyprint
 */
#include "cpp-pyprint/pyprint.h"

#endif

void solve() {
    ll N, A, B, C;
    cin >> N >> A >> B >> C;
    vector<string> S(N);
    rep(i, N) cin >> S[i];
    vector<string> ans;
    rep(i, N) {
        string s = S[i];
        if (s == "AB") {
            if (A == 0 && B == 0) {
                cout << "No" << '\n';
                return;
            } else if (A == 0) {
                A = 1;
                B--;
                ans.push_back("A");
            } else if (B == 0) {
                B = 1;
                A--;
                ans.push_back("B");
            } else {
                if (i == N - 1) {
                    ans.push_back("A");
                } else {
                    string next = S[i + 1];
                    if (next == s) {
                        A++;
                        B--;
                        ans.push_back("A");
                    } else if (next == "BC") {
                        B++;
                        A--;
                        ans.push_back("B");
                    } else {
                        A++;
                        B--;
                        ans.push_back("A");
                    }
                }
            }
        } else if (s == "BC") {
            if (C == 0 && B == 0) {
                cout << "No" << '\n';
                return;
            } else if (C == 0) {
                C = 1;
                B--;
                ans.push_back("C");
            } else if (B == 0) {
                B = 1;
                C--;
                ans.push_back("B");
            } else {
                if (i == N - 1) {
                    ans.push_back("C");
                } else {
                    string next = S[i + 1];
                    if (next == s) {
                        C++;
                        B--;
                        ans.push_back("C");
                    } else if (next == "AB") {
                        B++;
                        C--;
                        ans.push_back("B");
                    } else {
                        C++;
                        B--;
                        ans.push_back("C");
                    }
                }
            }
        } else {
            if (A == 0 && C == 0) {
                cout << "No" << '\n';
                return;
            } else if (A == 0) {
                A = 1;
                C--;
                ans.push_back("A");
            } else if (C == 0) {
                C = 1;
                A--;
                ans.push_back("C");
            } else {
                if (i == N - 1) {
                    ans.push_back("A");
                } else {
                    string next = S[i + 1];
                    if (next == s) {
                        A++;
                        C--;
                        ans.push_back("A");
                    } else if (next == "BC") {
                        C++;
                        A--;
                        ans.push_back("C");
                    } else {
                        A++;
                        C--;
                        ans.push_back("A");
                    }
                }
            }
        }
    }
    cout << "Yes" << '\n';
    for (auto &a : ans) {
        cout << a << '\n';
    }
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
    return 0;
}


Measured memory_bytes: 10568