// 5/3

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;

int main() {
    int N, A, B, C;

    cin >> N >> A >> B >> C;

    vector<int> S(N);  // AB = 0, AC = 1, BC = 2
    
    rep(i, N) {
        string s;
        cin >> s;

        if (s == "AB") S[i] = 0;
        else if (s == "AC") S[i] = 1;
        else S[i] = 2;
    }

    vector<char> choice(N);

    if (A + B + C == 0) {
        cout << "No" << endl;
    }

    else if (A + B + C == 1) {
        bool can = true;

        rep(i, N) {
            // cout << S[i] << endl;
            if (S[i] == 0) {
                // AB
                if (A == 0 && B == 0) {
                    // cout << "No" << endl;
                    can = false;
                    break;
                } else if (A == 1) {
                    A--; B++;
                    choice[i] = 'B';
                } else {
                    A++; B--;
                    choice[i] = 'A';
                }
            } else if (S[i] == 1) {
                // AC
                if (A == 0 && C == 0) {
                    // cout << "No" << endl;
                    can = false;
                    break;
                } else if (A == 1) {
                    A--; C++;
                    choice[i] = 'C';
                } else {
                    A++; C--;
                    choice[i] = 'A';
                }
            } else {
                // BC
                if (B == 0 && C == 0) {
                    // cout << "No" << endl;
                    can = false;
                    break;
                } else if (B == 1) {
                    B--; C++;
                    choice[i] = 'C';
                } else {
                    B++; C--;
                    choice[i] = 'B';
                }
            }
        }

        if (can) {
            cout << "Yes" << endl;
            rep(i, N) cout << choice[i] << endl;
        } else {
            cout << "No" << endl;
        }
    }

    else if (A + B + C == 2) {
        bool can = true;

        int V[3] = {A, B, C};
        char C[3] = {'A', 'B', 'C'};

        rep(i, N) {
            int p, q;
            if (S[i] == 0) {
                p = 0;
                q = 1;
            }
            else if (S[i] == 1) {
                p = 0;
                q = 2;
            } else {
                p = 1;
                q = 2;
            }

            // 両方ゼロの場合は速攻でNo。
            if (V[p] == 0 && V[q] == 0) {
                can = false;
                break;
            }

            // 片方が0の場合は、とりあえず++する。（もう片方は自動的に2。）
            if (V[p] == 0) {
                V[p]++;
                V[q]--;
                choice[i] = C[p];
            } else if (V[q] == 0) {
                V[p]--;
                V[q]++;
                choice[i] = C[q];
            }
            // 両方1の場合は
            else {
                // その次の回を見て、かぶっているやつを足しておく。
                if (i != N - 1) {
                    int np, nq;
                    if (S[i + 1] == 0) {
                        np = 0;
                        nq = 1;
                    }
                    else if (S[i + 1] == 1) {
                        np = 0;
                        nq = 2;
                    } else {
                        np = 1;
                        nq = 2;
                    }

                    // pがかぶってる場合
                    if (p == np || p == nq) {
                        V[p]++;
                        V[q]--;
                        choice[i] = C[p];
                    }
                    // qがかぶってる場合
                    else {
                        V[p]--;
                        V[q]++;
                        choice[i] = C[q];
                    }
                }
                // 最終回の場合はどっちでもいい。
                else {
                    choice[i] = C[p];
                }
            }
        }

        if (can) {
            cout << "Yes" << endl;
            rep(i, N) cout << choice[i] << endl;
        } else {
            cout << "No" << endl;
        }
    }

    // A + B + C > 2
    else {
        bool can = true;

        int V[3] = {A, B, C};
        char C[3] = {'A', 'B', 'C'};

        rep(i, N) {
            int p, q;
            if (S[i] == 0) {
                p = 0;
                q = 1;
            }
            else if (S[i] == 1) {
                p = 0;
                q = 2;
            } else {
                p = 1;
                q = 2;
            }

            // 基本的に0と0じゃなければつまない
            if (V[p] == 0 && V[q] == 0) {
                can = false;
                break;
            }
            // 片方が0の時はそっちをプラス。
            else if (V[p] == 0) {
                V[p]++;
                V[q]--;
                choice[i] = C[p];
            }
            else if (V[q] == 0) {
                V[p]--;
                V[q]++;
                choice[i] = C[q];
            }

            // それ以外の場合は適当で良い！！！
            // else {
            //     V[p]++;
            //     V[q]--;
            //     choice[i] = C[p];
            // }

            else if (V[p] >= V[q]) {
                V[p]--;
                V[q]++;
                choice[i] = C[q];
            } else {
                V[p]++;
                V[q]--;
                choice[i] = C[p];
            }
        }

        if (can) {
            cout << "Yes" << endl;
            rep(i, N) cout << choice[i] << endl;
        } else {
            cout << "No" << endl;
        }
    }

}


Measured memory_bytes: 3808