#include <bits/stdc++.h>
using namespace std;
 
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n'
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
template<class T> inline void prn(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << ' ';}
template<class T> inline void printv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');}
template<class T> inline void printvv(vector<vector<T>>& v) {for (auto u : v) printv(u);}
template<class T> inline void printlnv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << endl;}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
 
void solve();
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(numeric_limits<double>::max_digits10);
    solve();
    return 0;
}

void solve() {
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    vector<string> s(n);
    REP(i, n) cin >> s[i];

    bool ok = true;
    vector<char> ans(n);
    REP(i, n) {
        if (s[i] == "AB") {
            if (a == 0 and b == 0) {
                ok = false;
                break;
            }
            if (a > b) {
                a--;
                b++;
                ans[i] = 'B';
            } else if (a < b) {
                a++;
                b--;
                ans[i] = 'A';
            } else {
                if (i == n - 1) {
                    a--;
                    b++;
                    ans[i] = 'B';
                } else {
                    if (s[i + 1][0] == 'A') {
                        a++;
                        b--;
                        ans[i] = 'A';
                    } else {
                        a--;
                        b++;
                        ans[i] = 'B';
                    }
                }
            }
        } else if (s[i] == "AC") {
            if (a == 0 and c == 0) {
                ok = false;
                break;
            }
            if (a > c) {
                a--;
                c++;
                ans[i] = 'C';
            } else if (a < c) {
                a++;
                c--;
                ans[i] = 'A';
            } else {
                if (i == n - 1) {
                    a--;
                    c++;
                    ans[i] = 'C';
                } else {
                    if (s[i + 1][0] == 'A') {
                        a++;
                        c--;
                        ans[i] = 'A';
                    } else {
                        a--;
                        c++;
                        ans[i] = 'C';
                    }
                }
            }
        } else if (s[i] == "BC") {
            if (b == 0 and c == 0) {
                ok = false;
                break;
            }
            if (b > c) {
                b--;
                c++;
                ans[i] = 'C';
            } else if (b < c) {
                b++;
                c--;
                ans[i] = 'B';
            } else {
                if (i == n - 1) {
                    b--;
                    c++;
                    ans[i] = 'C';
                } else {
                    if (s[i + 1][1] == 'C') {
                        b--;
                        c++;
                        ans[i] = 'C';
                    } else {
                        b++;
                        c--;
                        ans[i] = 'B';
                    }
                }
            }
        }
    }

    if (ok) {
        cout << "Yes" << endl;
        printlnv(ans);
    } else {
        cout << "No" << endl;
    }
}


Measured memory_bytes: 6636