#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <numeric>
#include <ctime>
#include <complex>
#include <bitset>
#include <random>

using namespace std;

typedef long long ll;
typedef long double ld;

#define int ll
#define double ld
#define loop(i, n) for(int i = 0; i < (int)n; ++i)
#define loop1(i, n) for(int i = 1; i <= (int)n; ++i)
#define F first
#define S second
#define pb push_back
#define pi pair <int, int>
#define all(x) begin(x), end(x)
#define ti tuple <int, int, int>
#define Point Vect
#define no {cout << "0\n"; return;}
#define mkp make_pair

pi ret(string s) {
    if (s == "AB")
        return { 0, 1 };
    if (s == "AC")
        return { 0, 2 };
    return { 1, 2 };
}

vector <int> solve2(ti tt, vector <pi> ask) {
    int a[3], n = ask.size();
    tie(a[0], a[1], a[2]) = tt;
    vector <int> ans(n);
    if (a[ask[0].F] + a[ask[0].S] == 0) {
        ans.clear(); return ans;
    }
    loop(i, n) {
        int f = ask[i].F, s = ask[i].S;
        if (a[f] + a[s] == 1) {
            ans[i] = (a[f] ? s : f);
            swap(a[f], a[s]);
        }
        else {
            int j = i + 1;
            for (; j < n && ask[j] == ask[i]; ++j);
            bool c = j == n || s == ask[j].F || s == ask[j].S;
            for (int k = i; k < j; ++k) {
                if (a[f] == 2 || a[s] == 2) {
                    ans[k] = (a[f] ? s : f);
                    a[f] = a[s] = 1;
                }
                else {
                    if (!c) {
                        ans[k] = f;
                        a[f] = 2; a[s] = 0;
                    }
                    else {
                        ans[k] = s;
                        a[f] = 0; a[s] = 2;
                    }
                }
            }
            i = j - 1;
        }
    }
    return ans;
}

vector <int> solve(ti tt, vector <pi> ask) {
    int a[3], n = ask.size();
    tie(a[0], a[1], a[2]) = tt;
    bool ok = 1;
    vector <int> ans(n);
    loop(i, n) {
        pi p = ask[i];
        if (a[p.F] + a[p.S] == 0)
            ok = 0;
        else {
            if (a[p.F] > a[p.S]) {
                ans[i] = p.S;
                --a[p.F]; ++a[p.S];
            }
            else {
                ans[i] = p.F;
                --a[p.S]; ++a[p.F];
            }
        }
    }
    if (!ok)
        ans.clear(); 
    return ans;
}

pair <ti, vector <pi> > generator(int n) {
    mt19937 gen(228);
    uniform_int_distribution <int> big_int(0, 10);
    uniform_int_distribution <int> small_int(0, 2);
    ti f = make_tuple(small_int(gen), small_int(gen), small_int(gen));
    vector <pi> s(n);
    loop(i, n) {
        int x = small_int(gen);
        if (x == 0)
            s[i] = {0, 1};
        else if (x == 1)
            s[i] = {0, 2};
        else
            s[i] = {1, 2};
    }
    return { f, s };
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n, a[3], sum;
    cin >> n >> a[0] >> a[1] >> a[2];
    sum = a[0] + a[1] + a[2];
    vector <int> ans;
    vector <pi> ask(n);
    loop(i, n) {
        string s; cin >> s;
        ask[i] = ret(s);
    }
    if (sum == 2)
        ans = solve2(make_tuple(a[0], a[1], a[2]), ask);
    else
        ans = solve(make_tuple(a[0], a[1], a[2]), ask);
    if (ans.size() == 0)
        cout << "No";
    else {
        cout << "Yes\n";
        loop(i, n)
            cout << char(ans[i] + 'A') << "\n";
    }
    /*int cnt = 0;
    while (1) {
        int n = 7;
        ++cnt;
        if (cnt % 1000 == 0)
            cout << "ok\n";
        auto test = generator(n);
        int sum = get<0>(test.F) + get<1>(test.F) + get<2>(test.F);
        auto ans = (sum == 2 ? solve2(test.F, test.S) : solve(test.F, test.S));
        if (ans.size() == 0) continue;
        int a[3];
        tie(a[0], a[1], a[2]) = test.F;
        loop(i, test.S.size()) {
            if ((ans[i] != test.S[i].F && ans[i] != test.S[i].S) || a[0] < 0 || a[1] < 0 || a[2] < 0) {
                cout << "{ " << get<0>(test.F) << ", " << get<1>(test.F) << ", " << get<2>(test.F) << "}\n";
                loop(i, n)
                    cout << test.S[i].F << " " << test.S[i].S << "\n";
                return 0;
            }
            if (ans[i] == test.S[i].F) {
                ++a[test.S[i].F]; --a[test.S[i].S];
            }
            else {
                ++a[test.S[i].S]; --a[test.S[i].F];
            }
        }
    }*/
    return 0;
}

Measured memory_bytes: 7164