#include <bits/stdc++.h>
using namespace std;

const string YES = "Yes";
const string NO = "No";

bool zero(long long& A, long long& B, long long& C, string q) {
    if (q == "AB") {
        return A == 0 && B == 0;
    }
    if (q == "BC") {
        return B == 0 && C == 0;
    }
    if (q == "AC") {
        return A == 0 && C == 0;
    }
    return false;
}

void values(long long** X, long long** Y, long long* A, long long* B, long long* C, string q) {
    if (q == "AB") {
        *X = A;
        *Y = B;
    }
    if (q == "BC") {
        *X = B;
        *Y = C;
    }
    if (q == "AC") {
        *X = A;
        *Y = C;
    }
}

char operation(long long* A, long long* B, long long* C, string q) {
    long long *X, *Y;
    values(&X, &Y, A, B, C, q);
    // cout << A << endl;
    // cout << B << endl;
    // cout << C << endl;
    // cout << X << endl;
    // cout << Y << endl;
    // cout << *A << " " << *B << " " << *C << endl;

    if (*X > *Y) {
        (*X)--;
        (*Y)++;
        // cout << *A << " " << *B << " " << *C << endl;
        return q[1];
    } else {
        (*X)++;
        (*Y)--;
        // cout << *A << " " << *B << " " << *C << endl;
        return q[0];
    }
}

char operation(long long* A, long long* B, long long* C, string q1, string q2) {
    long long *X, *Y;
    values(&X, &Y, A, B, C, q1);
    if (*X == 1 && *Y == 1) {
        if ((q1 == "AB" && q2 == "BC") || (q1 == "BC" && q2 == "AC") || (q1 == "AC" && q2 == "BC")) {
            (*X)--;
            (*Y)++;
            return q1[1];
        }
        if ((q1 == "AB" && q2 == "AC") || (q1 == "BC" && q2 == "AB") || (q1 == "AC" && q2 == "AB")) {
            (*X)++;
            (*Y)--;
            return q1[0];
        }
    }

    if (*X > *Y) {
        (*X)--;
        (*Y)++;
        return q1[1];
    } else {
        (*X)++;
        (*Y)--;
        return q1[0];
    }
}

void solve(long long N, long long A, long long B, long long C, std::vector<std::string> s){
    vector<char> result(s.size());
    bool no = false;
    if (A == 0 && B == 0 && C == 0) {
        cout << NO << endl;
        return;
    }

    if (A + B + C == 1) {
        for (int i = 0; i < N; i++) {
            if (zero(A, B, C, s[i])) {
                cout << NO << endl;
                return;
            } else {
                result[i] = operation(&A, &B, &C, s[i]);
                // printf("%d %d %d\n", A, B, C);
            }
        }

        cout << YES << endl;
        for (int i = 0; i < N; i++) {
            cout << result[i] << endl;
        }
        return;
    }

    if (A + B + C >= 2) {
        if (zero(A, B, C, s[0])) { 
            cout << NO << endl;
            return;
        }

        for (int i = 0; i < N; i++) {
            result[i] = i + 1 < N ? operation(&A, &B, &C, s[i], s[i+1]) : operation(&A, &B, &C, s[i]);
        }

        cout << YES << endl;
        for (int i = 0; i < N; i++) {
            cout << result[i] << endl;
        }
        return;
    }
    return;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long N;
    scanf("%lld",&N);
    long long A;
    scanf("%lld",&A);
    long long B;
    scanf("%lld",&B);
    long long C;
    scanf("%lld",&C);
    std::vector<std::string> s(N);
    for(int i = 0 ; i < N ; i++){
        std::cin >> s[i];
    }
    solve(N, A, B, C, std::move(s));
    return 0;
}


Measured memory_bytes: 6444