#include"bits/stdc++.h"
using namespace std;
#define REP(k,m,n) for(int (k)=(m);(k)<(n);(k)++)
#define rep(i,n) REP((i),0,(n))
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using tp3 = tuple<int, int, int>;
using Mat = vector<vector<ll>>;
constexpr int INF = 1 << 28;
constexpr ll INFL = 1ll << 60;
constexpr int dh[4] = { 0,1,0,-1 };
constexpr int dw[4] = { -1,0,1,0 };
bool isin(const int H, const int W, const int h, const int w) {
    return 0 <= h && h < H && 0 <= w && w < W;
}
template<typename T>
T minch(T& l, T r) {
    return l = min(l, r);
}
template<typename T>
T maxch(T& l, T r) {
    return l = max(l, r);
}
template<typename T>
void output(const T& val) {
    cout << val << endl;
}
template<typename T>
void output(const vector<T>& vec, const bool newline = false) {
    for (const T& val : vec)cout << val << (newline ? '\n' : ' '); cout << endl;
}
template<typename T>
void output(const vector<vector<T>>& mat) {
    for (const auto& row : mat)output(row);
}
// ============ template finished ============

int common(string s1, string s2) {
    map<char, int> mp;
    for (char c : s1)mp[c]++;
    for (char c : s2)mp[c]++;
    for (auto itr : mp) {
        if (itr.second == 2) {
            return itr.first - 'A';
        }
    }
    return -1;
}

int norm_process(vector<ll>& abc, const ll com) {
    ll next = (com + 1) % 3;
    if (abc[com] > abc[next]) {
        abc[com]--;
        abc[next]++;
        return next;
    }
    else if (abc[com] < abc[next]) {
        abc[next]--;
        abc[com]++;
        return com;
    }
    else if (abc[com] > 0) {
        abc[next]--;
        abc[com]++;
        return com;
    }
    else {
        return -1;
    }
}

ll parse(string s) {
    if (s == "AB")return 0;
    if (s == "BC")return 1;
    return 2;
}

int main()
{
    ll N;
    cin >> N;
    vector<ll> abc(3);
    vector<string> ss(N);
    vector<ll> s(N);
    rep(i, 3)cin >> abc[i];
    rep(i, N) {
        cin >> ss[i];
        s[i] = parse(ss[i]);
    }

    ll tot = abc[0] + abc[1] + abc[2];
    vector<int> res;
    if (tot == 0) {
        cout << "No" << endl;
        return 0;
    }
    else if (tot == 2) {
        rep(i, N) {
            ll com = s[i];
            ll next = (com + 1) % 3;
            if (abc[com] == 0 || abc[next] == 0 || i == N - 1) {
                int tres = norm_process(abc, com);
                if (tres == -1) {
                    cout << "No" << endl;
                    return 0;
                }
                res.push_back(tres);
            }
            else {
                int cm = common(ss[i], ss[i + 1]);
                if (cm == com) {
                    abc[com]++;
                    abc[next]--;
                    res.push_back(com);
                }
                else {
                    abc[com]--;
                    abc[next]++;
                    res.push_back(next);
                }
            }
        }
    }
    else {
        for (ll com : s) {
            int tres = norm_process(abc, com);
            if (tres == -1) {
                cout << "No" << endl;
                return 0;
            }
            res.push_back(tres);
        }
    }

    cout << "Yes" << endl;
    for (int num : res) {
        switch (num) {
        case 0:cout << "A" << endl; break;
        case 1:cout << "B" << endl; break;
        case 2:cout << "C" << endl; break;
        }
    }
    return 0;
}


Measured memory_bytes: 7848