/*
    Author: Nguyen Tan Bao
    Status:
    Idea:
*/
 
#include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(),a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define FORE(i,a,b) for (int i = (a); i >= (b); i--)
#define FORALL(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
//__builtin_ffs(x) return 1 + index of least significant 1-bit of x
//__builtin_clz(x) return number of leading zeros of x
//__builtin_ctz(x) return number of trailing zeros of x
 
using namespace std;
using ll = long long;
using ld = double;
typedef pair<int, int> II;
typedef pair<II, int> III;
typedef complex<ld> cd;
typedef vector<cd> vcd;
 
const ll MODBASE = 1000000007LL;
const int MAXN = 100010;
const int MAXM = 1000;
const int MAXK = 16;
const int MAXQ = 200010;

string res;
bool co[MAXN][3][3][3];
string trace[MAXN][3][3][3];

void modify(int &a, int &b, char A, char B) {
    if (a > b) {
        a--;
        b++;
        res += B;
    }
    else {
        a++;
        b--;
        res += A;
    }
    if (a < 0 || b < 0) {
        cout << "No";
        exit(0);
    }
}

bool isOK(int a, int b) {
    return a >= 0 && b >= 0;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    if (a + b + c <= 2) {
        co[0][a][b][c] = true;
        FOR(i,1,n) {
            string s;
            cin >> s;
            FOR(A,0,2)
                FOR(B,0,2)
                    FOR(C,0,2)
                        if (co[i-1][A][B][C]) {
                            if (s == "AB") {
                                if (isOK(A-1, B+1)) {
                                    co[i][A-1][B+1][C] = true;
                                    trace[i][A-1][B+1][C] = "BA";
                                }
                                if (isOK(A+1, B-1)) {
                                    co[i][A+1][B-1][C] = true;
                                    trace[i][A+1][B-1][C] = "AB";
                                }
                            } else if (s == "AC") {
                                if (isOK(A-1, C+1)) {
                                    co[i][A-1][B][C+1] = true;
                                    trace[i][A-1][B][C+1] = "CA";
                                }
                                if (isOK(A+1, C-1)) {
                                    co[i][A+1][B][C-1] = true;
                                    trace[i][A+1][B][C-1] = "AC";
                                }
                            } else {
                                if (isOK(B-1, C+1)) {
                                    co[i][A][B-1][C+1] = true;
                                    trace[i][A][B-1][C+1] = "CB";
                                }
                                if (isOK(B+1, C-1)) {
                                    co[i][A][B+1][C-1] = true;
                                    trace[i][A][B+1][C-1] = "BC";
                                }
                            }
                        }
        }
        bool yes = false;
        FOR(A,0,2) FOR(B,0,2) FOR(C,0,2)
            if (co[n][A][B][C]) {
                yes = true;
                FORE(i,n,1) {
                    char ch1 = trace[i][A][B][C][0], ch2 = trace[i][A][B][C][1];
                    res += ch1;
                    if (ch1 == 'A') A--;
                    else if (ch1 == 'B') B--;
                    else C--;
                    if (ch2 == 'A') A++;
                    else if (ch2 == 'B') B++;
                    else C++;
                }
                reverse(ALL(res));
                cout << "Yes\n";
                for (char ch : res) cout << ch << "\n";
                exit(0);
            }
        if (!yes) cout << "No";
    }
    else {
        FOR(i,1,n) {
            string s;
            cin >> s;
            if (s == "AB") modify(a, b, 'A', 'B');
            else if (s == "AC") modify(a, c, 'A', 'C');
            else modify(b, c, 'B', 'C');
        }
        cout << "Yes\n";
        for (char ch : res) cout << ch << "\n";
    }
    return 0;
}


Measured memory_bytes: 90804