#include <bits/stdc++.h>

int main(){
    int N, A, B, C;
    std::cin >> N >> A >> B >> C;
    std::vector< int > S(N);
    std::vector< int > ABpos;
    std::vector< int > BCpos;
    std::vector< int > ACpos;
    for(int i=0; i<N; i++){
        std::string tmp;
        std::cin >> tmp;
        if(tmp == "AB"){
            S[i] = 0;
            ABpos.push_back(i);
        }else if(tmp == "BC"){
            S[i] = 1;
            BCpos.push_back(i);
        }else{
            S[i] = 2;
            ACpos.push_back(i);
        }
    }
    
    std::vector< char > ans(N);
    for(int i=0; i<N-1; i++){
        if(S[i] == 0){
            if(A == 0 && B == 0){
                std::cout << "No" << std::endl;
                return 0;
            }else if(A == B){
                if(S[i+1] == 0 || S[i+1] == 2){
                    A++;
                    B--;
                    ans[i] = 'A';
                }else{
                    A--;
                    B++;
                    ans[i] = 'B';
                }
            }else if(A > B){
                A--;
                B++;
                ans[i] = 'B';
            }else{
                A++;
                B--;
                ans[i] = 'A';
            }
        }
        
        if(S[i] == 1){
            if(B == 0 && C == 0){
                std::cout << "No" << std::endl;
                return 0;
            }else if(B == C){
                if(S[i+1] == 1 || S[i+1] == 0){
                    B++;
                    C--;
                    ans[i] = 'B';
                }else{
                    B--;
                    C++;
                    ans[i] = 'C';
                }
            }else if(B > C){
                B--;
                C++;
                ans[i] = 'C';
            }else{
                B++;
                C--;
                ans[i] = 'B';
            }
        }
        
        if(S[i] == 2){
            if(A == 0 && C == 0){
                std::cout << "No" << std::endl;
                return 0;
            }else if(A == C){
                if(S[i+1] == 2 || S[i+1] == 0){
                    A++;
                    C--;
                    ans[i] = 'A';
                }else{
                    A--;
                    C++;
                    ans[i] = 'C';
                }
            }else if(A > C){
                A--;
                C++;
                ans[i] = 'C';
            }else{
                A++;
                C--;
                ans[i] = 'A';
            }
        }
        //std::cout << A << " " << B << " " << C << std::endl;
    }
    
    if(S[N-1] == 0){
        if(A == 0 && B == 0){
            std::cout << "No" << std::endl;
            return 0;
        }else if(A){
            ans[N-1] = 'B';
        }else{
            ans[N-1] = 'A';
        }
    }
    if(S[N-1] == 1){
        if(B == 0 && C == 0){
            std::cout << "No" << std::endl;
            return 0;
        }else if(B){
            ans[N-1] = 'C';
        }else{
            ans[N-1] = 'B';
        }
    }
    if(S[N-1] == 2){
        if(A == 0 && C == 0){
            std::cout << "No" << std::endl;
            return 0;
        }else if(A){
            ans[N-1] = 'C';
        }else{
            ans[N-1] = 'A';
        }
    }
    
    std::cout << "Yes" << std::endl;
    for(int i=0; i<N; i++){
        std::cout << ans[i] << std::endl;
    }
    
    return 0;
    
}


Measured memory_bytes: 4588