#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <numeric>
#include <utility>
#include <tuple>

#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
using namespace std;
using ll = long long int;
using P = pair<ll, ll>;

// clang-format off
#ifdef _DEBUG_
#define dump(...) do{ cerr << __LINE__ << ":\t" << #__VA_ARGS__ << " = "; PPPPP(__VA_ARGS__); cerr << endl; } while(false)
template<typename T> void PPPPP(T t) { cerr << t; }
template<typename T, typename... S> void PPPPP(T t, S... s) { cerr << t << ", "; PPPPP(s...); }
#else
#define dump(...) do{ } while(false)
#endif
template<typename T> vector<T> make_v(size_t a, T b) { return vector<T>(a, b); }
template<typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v(ts...))>(a, make_v(ts...)); }
template<typename T> bool chmin(T &a, T b) { if (a > b) {a = b; return true; } return false; }
template<typename T> bool chmax(T &a, T b) { if (a < b) {a = b; return true; } return false; }
template<typename T> void print(T a) { cout << a << endl; }
template<typename T, typename... Ts> void print(T a, Ts... ts) { cout << a << ' '; print(ts...); }
template<typename T> istream &operator,(istream &in, T &t) { return in >> t; }
class Range {
    using T = long long;
    class Iterator {
        T val, step, diff;
    public:
        Iterator(T v, T s, T d): val(v), step(s), diff(d) {}
        T operator*() { return val + diff; }
        bool operator!=(const Iterator &itr) { return step > 0 ? val < itr.val : val > itr.val; }
        Iterator operator++() { val += step; return *this; }
    };
    Iterator _begin, _end;
public:
    Range(T b, T e, T s, T d): _begin(b, s, d), _end(e, s, d) {
        if (s < 0) { _begin = Iterator(e - 1, s, d); _end = Iterator(b - 1, s, d); }
    }
    Range(T b, T e, T s): Range(b, e, s, 0) {}
    Range(T b, T e): Range(b, e, 1, 0) {}
    Range(T e): Range(0, e, 1, 0) {}
    Iterator begin() { return _begin; }
    Iterator end() { return _end; }
};
// clang-format on

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ll n, abc[3];
    cin, n;
    for (ll _ : Range(3)) {
        cin, abc[_];
    }

    vector<string> v(n);
    for (auto &ss : v) {
        cin, ss;
    }
    string ans = "";
    for (auto i : Range(n)) {
        int x = v[i][0] - 'A', y = v[i][1] - 'A';
        if (abc[x] == 0 && abc[y] == 0) {
            cout << "No" << endl;
            return 0;
        } else if (abc[x] == 0) {
            abc[x]++;
            abc[y]--;
            ans += x + 'A';
        } else if (abc[y] == 0) {
            abc[y]++;
            abc[x]--;
            ans += y + 'A';
        } else if (abc[3 - x - y] == 0 && i + 1 != v.size() && v[i] != v[i + 1]) {
            int xx = v[i + 1][0] - 'A', yy = v[i + 1][1] - 'A';
            if (x == xx || x == yy) {
                abc[x]++;
                abc[y]--;
                ans += x + 'A';
            } else {
                abc[y]++;
                abc[x]--;
                ans += y + 'A';
            }
        } else {
            abc[x]++;
            abc[y]--;
            ans += x + 'A';
        }
        dump(abc[0], abc[1], abc[2]);
    }
    cout << "Yes" << endl;
    for (auto c : ans) {
        cout << c << endl;
    }
    return 0;
}


Measured memory_bytes: 6692