#include <bits/stdc++.h>

#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define LCM(a, b) (a) / __gcd((a), (b)) * (b)
#define CEIL(a, b) (a)/(b)+(((a)%(b))?1:0)
#define ln '\n'

using namespace std;
using LL = long long;
using ldouble = long double;
using P = pair<int, int>;
using LP = pair<LL, LL>;

static const int INF = INT_MAX;
static const LL LINF = LLONG_MAX;
static const int MIN = INT_MIN;
static const LL LMIN = LLONG_MIN;
static const int MOD = 1e9 + 7;
static const int SIZE = 200005;

const int dx[] = {0, -1, 1, 0};
const int dy[] = {-1, 0, 0, 1};

vector<LL> Div(LL n) {
    vector<LL> ret;
    for(LL i = 1; i * i <= n; ++i) {
        if(n % i == 0) {
            ret.pb(i);
            if(i * i != n) ret.pb(n / i);
        }
    }
    sort(all(ret));
    return ret;
}

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

    int N, A, B, C;
    cin >> N >> A >> B >> C;
    vector<string> v(N);
    for(int i = 0; i < N; ++i) {
        cin >> v[i];

    }

    bool f = true;
    vector<char> res;
    for(int i = 0; i < N - 1; ++i) {
        char add = 'T';
        if(v[i] == "AB" && A == 0 && B == 0 ||
           v[i] == "BC" && B == 0 && C == 0 ||
           v[i] == "AC" && A == 0 && C == 0) {
            f = false;
            break;

        }
        if(v[i] == "AB") {
            if(A == 0) {add = 'A'; ++A; --B;}
            else if(B == 0) {add = 'B'; ++B; --A;}
            else {
                if(A + B + C == 2 && A == 1 && B == 1 && v[i] != v[i + 1]) {
                    if(v[i + 1] == "BC") {add = 'B'; ++B; --A;}
                    else {add = 'A'; ++A; --B;}

                } else {
                    if(A < B) {add = 'A'; ++A; --B;}
                    else {add = 'B'; ++B; --A;}

                }
            }
        }
        if(v[i] == "BC") {
            if(B == 0) {add = 'B'; ++B; --C;}
            else if(C == 0) {add = 'C'; ++C; --B;}
            else {
                if(A + B + C == 2 && B == 1 && C == 1 && v[i] != v[i + 1]) {
                    if(v[i + 1] == "AB") {add = 'B'; ++B; --C;}
                    else {add = 'C'; ++C; --B;}

                } else {
                    if(B < C) {add = 'B'; ++B; --C;}
                    else {add = 'C'; ++C; --B;}

                }
            }
        }
        if(v[i] == "AC") {
            if(A == 0) {add = 'A'; ++A; --C;}
            else if(C == 0) {add = 'C'; ++C; --A;}
            else {
                if(A + B + C == 2 && A == 1 && C == 1 && v[i] != v[i + 1]) {
                    if(v[i + 1] == "AB") {add = 'A'; ++A; --C;}
                    else {add = 'C'; ++C; --A;}

                } else {
                    if(A < C) {add = 'A'; ++A; --C;}
                    else {add = 'C'; ++C; --A;}

                }
            }
        }
        res.pb(add);
    }

    int c = v.size() - 1;
    string t = v[c];
    char add = 'T';
    if(t == "AB" && A == 0 && B == 0 ||
       t == "BC" && B == 0 && C == 0 ||
       t == "AC" && A == 0 && C == 0) {
        f = false;

    } else {
        if(t == "AB") {
            if(A == 0) add = 'A';
            else add = 'B';

        }
        if(t == "BC") {
            if(B == 0) add = 'B';
            else add = 'C';

        }
        if(t == "AC") {
            if(A == 0) add = 'A';
            else add = 'C';

        }
    }
    res.pb(add);

    if(!f) {
        cout << "No" << endl;

    } else {
        cout << "Yes" << endl;
        for(int i = 0; i < res.size(); ++i) {
            cout << char(res[i]) << endl;

        }
    }

    return 0;
}



Measured memory_bytes: 6608