//
//  main.cpp
//

#include <algorithm>
#include <array>
#include <assert.h>
#include <complex>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <memory>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

using ll = int64_t;
using ull = uint64_t;
constexpr ll LL_MAX = numeric_limits<ll>::max();
constexpr ull ULL_MAX = numeric_limits<ull>::max();

template<typename T>
vector<T> make_vec_nd(T init, ll size) {
	return vector<T>(size, init);
}
template<typename T, typename... Args>
auto make_vec_nd(T init, ll size, Args... rest) {
	auto inner = make_vec_nd(init, rest...);
	return vector<decltype(inner)>(size, inner);
}

#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define rrep(i, a, b) for (ll i = (a)-1; i >= (b); i--)

int main() {
    ll N, A, B, C;
    cin >> N >> A >> B >> C;
    vector<ll*> vars = {&A, &B, &C};
    vector<pair<ll, ll>> changes(N);
    rep(i,0,N) {
        string s;
        cin >> s;
        pair<ll, ll> val;
        if (s == "AB") {
            val = pair<ll, ll>(0, 1);
        } else if (s == "BC") {
            val = pair<ll, ll>(1, 2);
        } else {
            val = pair<ll, ll>(0, 2);
        }
        changes[i] = val;
    }
    vector<string> char_map(3);
    char_map[0] = "A";
    char_map[1] = "B";
    char_map[2] = "C";
    vector<string> ans;
    auto choose = [&ans, &char_map, &vars](pair<ll, ll> change, ll idx) {
        ll increase = (idx == 0) ? change.first : change.second;
        ll decrease = (idx == 0) ? change.second : change.first;
        ans.push_back(char_map[increase]);
        (*vars[increase])++;
        (*vars[decrease])--;
        assert(*vars[0] >= 0 && *vars[1] >= 0 && *vars[2] >= 0);
    };
    rep(i,0,N) {
        pair<ll, ll> change = changes[i];
        if (*vars[change.first] == 0 && *vars[change.second] == 0) {
            cout << "No" << endl;
            return 0;
        }
        if (*vars[change.first] == 0) {
            choose(change, 0);
            continue;
        }
        if (*vars[change.second] == 0) {
            choose(change, 1);
            continue;
        }
        if (*vars[change.first] == 1 && *vars[change.second] == 1) {
            if (i < N-1) {
                pair<ll, ll> next = changes[i+1];
                if (change.first == next.first || change.first == next.second) {
                    choose(change, 0);
                    continue;
                }
                if (change.second == next.first || change.second == next.second) {
                    choose(change, 1);
                    continue;
                }
                assert(change.first == next.first && change.second == next.second);
                choose(change, 0);
                continue;
            } else {
                choose(change, 0);
                continue;
            }
        }
        if (*vars[change.first] < *vars[change.second]) {
            choose(change, 0);
            continue;
        } else {
            choose(change, 1);
            continue;
        }
    }
    assert(*vars[0] >= 0 && *vars[1] >= 0 && *vars[2] >= 0);
    cout << "Yes" << endl;
    for (string s : ans) {
        cout << s << endl;
    }
}


Measured memory_bytes: 7576