#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<functional>
#include<math.h>
using namespace std;
#define N (1000000000+7)
#define M (998244353)
#define INF 1e16
typedef long long ll;
typedef pair<ll,ll > P;
typedef pair<P,ll>Q;

ll v[4];

int main(void){
    int n;
    cin>>n;
    cin>>v[0]>>v[1]>>v[2];
    vector<string>s(n);
    vector<char>ans(n+1);
    for(int i=0;i<n;i++)cin>>s[i];
    for(int i=0;i<n;i++){
        char n1=s[i][0];
        char n2=s[i][1];
        if(i==n-1){
            if(v[n1-'A']==0&&v[n2-'A']==0){
                cout<<"No"<<endl;
                return 0;
            }
            if(v[n1-'A']>v[n2-'A']){
                ans[i]=n2;
                v[n1-'A']--;
                v[n2-'A']++;
            }
            else{
                ans[i]=n1;
                v[n1-'A']++;
                v[n2-'A']--;
            }
            continue;
        }
        if(v[n1-'A']==0){
            if(v[n2-'A']==0){
                cout<<"No"<<endl;
                return 0;
            }
            else{
                ans[i]=n1;
                v[n1-'A']++;
                v[n2-'A']--;
            }
        }
        else{
            if(v[n2-'A']==0){
                ans[i]=n2;
                v[n1-'A']--;
                v[n2-'A']++;
            }
            else{
                char nx1=s[i+1][0];
                char nx2=s[i+1][1];
                if(v[nx1-'A']==0){
                    if(n1==nx1){
                        ans[i]=n1;
                        v[n1-'A']++;
                        v[n2-'A']--;
                    }
                    else{
                        if(n2==nx1){
                            ans[i]=n2;
                            v[n1-'A']--;
                            v[n2-'A']++;
                        }
                        else{
                            if(n1==nx2){
                                ans[i]=nx2;
                                v[n1-'A']++;
                                v[n2-'A']--;
                            }
                            else{
                                if(n2==nx2){
                                    ans[i]=n2;
                                    v[n1-'A']--;
                                    v[n2-'A']++;
                                }
                                else{
                                    if(v[n1-'A']>v[n2-'A']){
                                        ans[i]=n2;
                                        v[n1-'A']--;
                                        v[n2-'A']++;
                                    }
                                    else{
                                        ans[i]=n1;
                                        v[n1-'A']++;
                                        v[n2-'A']--;
                                    }
                                }
                            }
                        }
                    }
                }
                else{
                    if(v[nx2-'A']==0){
                        if(n1==nx2){
                            ans[i]=n1;
                            v[n1-'A']++;
                            v[n2-'A']--;
                        }
                        else{
                            if(n2==nx2){
                                ans[i]=n2;
                                v[n1-'A']--;
                                v[n2-'A']++;
                            }
                            else{
                                if(n1==nx1){
                                    ans[i]=n1;
                                    v[n1-'A']++;
                                    v[n2-'A']--;
                                }
                                else{
                                    if(n2==nx1){
                                        ans[i]=n2;
                                        v[n1-'A']--;
                                        v[n2-'A']++;
                                    }
                                    else{
                                        if(v[n1-'A']>v[n2-'A']){
                                            ans[i]=n2;
                                            v[n1-'A']--;
                                            v[n2-'A']++;
                                        }
                                        else{
                                            ans[i]=n1;
                                            v[n1-'A']++;
                                            v[n2-'A']--;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else{
                        if(v[n1-'A']>v[n2-'A']){
                            ans[i]=n2;
                            v[n1-'A']--;
                            v[n2-'A']++;
                        }
                        else{
                            ans[i]=n1;
                            v[n1-'A']++;
                            v[n2-'A']--;
                        }
                    }
                }
            }
        }
    }
    cout<<"Yes"<<endl;
    for(int i=0;i<n;i++)cout<<ans[i]<<endl;
    return 0;
}

Measured memory_bytes: 6428