#define _USE_MATH_DEFINES
#include <bits/stdc++.h>

#define int long long
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define reps(i, n) for (int i = 1; i <= (n); ++i)
#define repd(i, n) for (int i = (n)-1; i >= 0; --i)
#define repds(i, n) for (int i = (n); i > 0; --i)
#define loop(i, x, n) for (int i = (x); i < (n); ++i)
#define loops(i, x, n) for (int i = (x); i <= (n); ++i)
#define loopd(i, x, n) for (int i = (x); i > (n); --i)
#define loopds(i, x, n) for (int i = (x); i >= (n); --i)
#define itrep(i, a) for (auto i = begin(a); i != end(a); ++i)
#define itrepd(i, a) for (auto i = rbegin(a); i != rend(a); ++i)
#define each(i, x) for (auto &i : x)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
template <class T>
using priority_queuel = priority_queue<T, vector<T>, greater<T>>;
constexpr ll inf = static_cast<ll>(1e18);
constexpr int iinf = static_cast<int>(1e9);
constexpr double dinf = 1e10;
constexpr ld ldinf = 1e18;
constexpr double eps = 1e-9;
ll mod = static_cast<ll>(1e9 + 7);
template <class T>
constexpr int sz(const T &a) { return (int)a.size(); }
template <class T>
constexpr T pow2(const T a) { return a * a; }
template <class T, class... Args>
constexpr void mins(T &a, Args... args) { a = min<T>({a, args...}); }
template <class T, class... Args>
constexpr void maxs(T &a, Args... args) { a = max<T>({a, args...}); }
template <class A, int N, class T>
void fillArray(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); }

template <typename F>
class FixPoint : private F {
public:
    explicit constexpr FixPoint(F &&f) noexcept : F(std::forward<F>(f)) {}
    template <typename... Args>
    constexpr decltype(auto)
    operator()(Args &&... args) const {
        return F::operator()(*this, std::forward<Args>(args)...);
    }
};

template <typename F>
static inline constexpr decltype(auto)
make_func(F &&f) noexcept {
    return FixPoint<F>{std::forward<F>(f)};
}

void solve() {
    int n;
    vector<ll> a(3);
    cin >> n >> a[0] >> a[1] >> a[2];
    vector<int> v(n);
    rep(i, n) {
        string s;
        cin >> s;
        if (s == "AB")
            v[i] = 0;
        else if (s == "BC")
            v[i] = 1;
        else
            v[i] = 2;
    }

    vector<int> ans(n);
    rep(i, n) {
        auto l = v[i];
        auto r = (v[i] + 1) % 3;
        if (a[l] == 0 && a[r] == 0) {
            cout << "No" << endl;
            return;
        }
        if (a[l] == 0) {
            ans[i] = l;
            ++a[l];
            --a[r];
        } else if (a[r] == 0) {
            ans[i] = r;
            ++a[r];
            --a[l];
        } else {
            if (i < n - 1) {
                auto nl = v[i + 1];
                auto nr = (v[i + 1] + 1) % 3;
                if (l == nl || l == nr) {
                    ans[i] = l;
                    ++a[l];
                    --a[r];
                } else {
                    ans[i] = r;
                    ++a[r];
                    --a[l];
                }
            } else {
                ans[i] = l;
                ++a[l];
                --a[r];
            }
        }
    }

    cout << "Yes" << endl;
    rep(i, n) {
        if (ans[i] == 0)
            cout << "A" << '\n';
        else if (ans[i] == 1)
            cout << "B" << '\n';
        else
            cout << "C" << '\n';
    }
}

signed main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
    cout.flush();
    return 0;
}


Measured memory_bytes: 4740