#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include <iomanip>
#include <assert.h>
#include <math.h>
#include <stack>
#include <queue>
#include <list>
using namespace std;

// #define __DEBUG__

#ifdef __DEBUG__
bool debug_disabled = false;
#else
bool debug_disabled = true;
#endif

#define dbg if (debug_disabled) {} else cerr

int good(int& a, int& b) {
    if (a == 0 && b == 0) return -1;
    if (a > b) {
        --a;
        ++b;
        return 1;
    } else if (a < b) {
        ++a;
        --b;
        return 0;
    } else if (a != 1) {
        ++a;
        --b;
        return 0;
    }
    return 2;
}

void solve() {
    int N;
    cin >> N;
    int A, B, C;
    cin >> A >> B >> C;
    vector<string> ops(N);

    if (A + B + C == 0) {
        cout << "No" << endl;
        return;
    }
    for (int i = 0; i < N; ++i) {
        cin >> ops[i];
    }
    vector<char> res(N);
    for (int i = 0; i < N; ++i) {
        string s = ops[i];
        if (s == "AB") {
            int cur = good(A, B);
            if (cur == -1) {
                cout << "No" << endl;
                return;
            }
            if (cur == 0) res[i] = 'A';
            else if (cur == 1) res[i] = 'B';
            else {
                if (i == N - 1) {
                    res[i] = 'A';
                } else {
                    if (ops[i + 1] == "AC") {
                        A = 2; B = 0;
                        res[i] = 'A';
                    } else if (ops[i + 1] == "BC") {
                        A = 0; B = 2;
                        res[i] = 'B';
                    } else {
                        A = 2; B = 0;
                        res[i] = 'A';
                    }
                }
            }
        } else if (s == "BC") {
            int cur = good(B, C);
            if (cur == -1) {
                cout << "No" << endl;
                return;
            }
            if (cur == 0) res[i] = 'B';
            else if (cur == 1) res[i] = 'C';
            else {
                if (i == N - 1) {
                    res[i] = 'B';
                } else {
                    if (ops[i + 1] == "AB") {
                        B = 2; C = 0;
                        res[i] = 'B';
                    } else if (ops[i + 1] == "AC") {
                        B = 0; C = 2;
                        res[i] = 'C';
                    } else {
                        B = 2; C = 0;
                        res[i] = 'B';
                    }
                }
            }
        } else if (s == "AC") {
            int cur = good(A, C);
            if (cur == -1) {
                cout << "No" << endl;
                return;
            }
            if (cur == 0) res[i] = 'A';
            else if (cur == 1) res[i] = 'C';
            else {
                if (i == N - 1) {
                    res[i] = 'A';
                } else {
                    if (ops[i + 1] == "AB") {
                        A = 2; C = 0;
                        res[i] = 'A';
                    } else if (ops[i + 1] == "BC") {
                        A = 0; C = 2;
                        res[i] = 'C';
                    } else {
                        A = 2; C = 0;
                        res[i] = 'A';
                    }
                }
            }
        }
    }
    cout << "Yes" << endl;
    for (int i = 0; i < N; ++i) {
        cout << res[i] << endl;
    }
}

int main() {
    cout.setf(ios::fixed, ios::floatfield);
    cout.setf(ios::showpoint);
    cout.precision(12);
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    int T = 1;
    // cin >> T;
    for (int i = 1; i <= T; ++i) {
        solve();
    }

    return 0;
}


Measured memory_bytes: 6660