#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#include <time.h>
#include <functional>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<ll, ll, ll, ll> tlglglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
typedef vector<ll> vll;
typedef vector< vector<ll> > matrix;
typedef unsigned int uint;
typedef unsigned long long ull;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
#define REP(i, x, y) for(ll i = (ll)x; i < (ll)y; i++)
#define DREP(i, x, y, d) for(ll i = (ll)x; i < (ll)y; i += (ll)d)
#define PER(i, x, y) for(ll i = (ll)x; i > (ll)y; i--)
#define DPER(i, x, y, d) for(ll i = (ll)x; i > (ll)y; i -= (ll)d)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-12;
void yesno(bool ok, string yes = "Yes", string no = "No") {
    if (ok) {
        cout << yes << endl;
    } else {
        cout << no << endl;
    }
}

typedef pair<ll, char> plc;

string s[100010];
ll N, A, B, C;

plc solve3(ll &p, ll &q, char pc, char qc, ll i) {
    if (p == 0 && q == 0) {
        return plc(-1, 'A');
    } else if (p > q) {
        p--;
        q++;
        return plc(0, qc);
    } else {
        q--;
        p++;
        return plc(0, pc);
    }
}

plc solve2(ll &p, ll &q, char pc, char qc, ll i) {
    if (p == 0 && q == 0) {
        return plc(-1, 'A');
    } else if (p == 2) {
        p--;
        q++;
        return plc(0, qc);
    } else if (q == 2) {
        q--;
        p++;
        return plc(0, pc);
    } else {
        if (p == 0) {
            p++;
            q--;
            return plc(0, pc);
        } else if (q == 0) {
            q++;
            p--;
            return plc(0, qc);
        } else {
            if (i < N - 1) {
                string ss = s[i + 1];
                if (ss[0] == pc || ss[1] == pc) {
                    p++;
                    q--;
                    return plc(0, pc);
                } else {
                    q++;
                    p--;
                    return plc(0, qc);
                }
            } else {
                p++;
                q--;
                return plc(0, pc);
            }
        }
    }
}

plc solve1(ll &p, ll &q, char pc, char qc, ll i) {
    if (p == 1) {
        q++;
        p--;
        return plc(0, qc);
    } else if (q == 1) {
        p++;
        q--;
        return plc(0, pc);
    } else {
        return plc(-1, 'A');
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N >> A >> B >> C;
    REP(i, 0, N) {
        cin >> s[i];
    }
    ll sum = A + B + C;
    bool ok = true;
    char ans[N];
    if (sum >= 3) {
        REP(i, 0, N) {
            if (s[i] == "AB") {
                plc p = solve3(A, B, 'A', 'B', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            } else if (s[i] == "BC") {
                plc p = solve3(B, C, 'B', 'C', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            } else {
                plc p = solve3(A, C, 'A', 'C', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            }
        }
    } else if (sum == 2) {
        REP(i, 0, N) {
            if (s[i] == "AB") {
                plc p = solve2(A, B, 'A', 'B', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            } else if (s[i] == "BC") {
                plc p = solve2(B, C, 'B', 'C', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            } else {
                plc p = solve2(A, C, 'A', 'C', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            }
        }
    } else if (sum == 1) {
        REP(i, 0, N) {
            if (s[i] == "AB") {
                plc p = solve1(A, B, 'A', 'B', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            } else if (s[i] == "BC") {
                plc p = solve1(B, C, 'B', 'C', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            } else {
                plc p = solve1(A, C, 'A', 'C', i);
                if (p.first == -1) {
                    ok = false;
                } else {
                    ans[i] = p.second;
                }
            }
        }
    } else {
        ok = false;
    }
    if (ok) {
        cout << "Yes" << endl;
        REP(i, 0, N) {
            cout << ans[i] << endl;
        }
    } else {
        cout << "No" << endl;
    }
}


Measured memory_bytes: 6876