#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

void _main() {
    int N, A, B, C;
    cin >> N >> A >> B >> C;
    vector<char> ans;
    vector<string> s(N);
    REP (i, N) cin >> s[i];
    REP (i, N) {
        if (s[i] == "AB") {
            if (A == 0 && B == 0) {
                cout << "No" << endl;
                return;
            }
            if (A == B) {
                if (i + 1 == N || (i + 1 < N && s[i + 1] == "AB")) {
                    if (A < B) {
                        A++;
                        B--;
                        ans.push_back('A');
                    } else {
                        A--;
                        B++;
                        ans.push_back('B');
                    }
                } else if (s[i + 1] == "AC") {
                    A++;
                    B--;
                    ans.push_back('A');
                } else {
                    A--;
                    B++;
                    ans.push_back('B');
                }
            } else if (A < B) {
                A++;
                B--;
                ans.push_back('A');
            } else {
                A--;
                B++;
                ans.push_back('B');
            }
        } else if (s[i] == "BC") {
            if (B == 0 && C == 0) {
                cout << "No" << endl;
                return;
            }
            if (B == C) {
                if (i + 1 == N || (i + 1 < N && s[i + 1] == "BC")) {
                    if (B < C) {
                        B++;
                        C--;
                        ans.push_back('B');
                    } else {
                        B--;
                        C++;
                        ans.push_back('C');
                    }
                } else if (s[i + 1] == "AB") {
                    B++;
                    C--;
                    ans.push_back('B');
                } else {
                    B--;
                    C++;
                    ans.push_back('C');
                }
            } else if (B < C) {
                B++;
                C--;
                ans.push_back('B');
            } else {
                B--;
                C++;
                ans.push_back('C');
            }
        } else if (s[i] == "AC") {
            if (C == 0 && A == 0) {
                cout << "No" << endl;
                return;
            }
            if (A == C) {
                if (i + 1 == N || (i + 1 < N && s[i + 1] == "AC")) {
                    if (A < C) {
                        A++;
                        C--;
                        ans.push_back('A');
                    } else {
                        A--;
                        C++;
                        ans.push_back('C');
                    }
                } else if (s[i + 1] == "AB") {
                    A++;
                    C--;
                    ans.push_back('A');
                } else {
                    A--;
                    C++;
                    ans.push_back('C');
                }
            } else if (A < C) {
                A++;
                C--;
                ans.push_back('A');
            } else {
                A--;
                C++;
                ans.push_back('C');
            }
        }
    }
    cout << "Yes" << endl;
    for (char c : ans) cout << c << endl;
}

signed main(signed argc, char **argv) {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);
    _main();
    return 0;
}

Measured memory_bytes: 6632