#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <climits>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <string>
#include <list>
#include <bitset>
#include <vector>
using namespace std;

#define I64d_OJ

//#ifdef I64d_OJ
//#define LL __int64
//#endif // I64d_OJ
#ifdef I64d_OJ
#define LL long long
#endif // I64d_OJ

typedef unsigned LL ULL;
typedef unsigned uint;
typedef pair<int,int> pii;
typedef pair<double,double> pdd;
typedef pair<LL,LL> pLL;
typedef vector<int> vi;

inline int read(){
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-') f=-f; ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0'; ch=getchar();}
    return x*f;
}

#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define ls rt<<1
#define rs rt<<1|1
#define MID(a,b) (((LL)(a)+(LL)(b))>>1)
#define absx(a) ((a)<0?-(a):(a))
#define MK(a,b) make_pair(a,b)
#define PB(a) push_back(a)
#define lowbit(x) ((x)&-(x))

#define lc c[x][0]
#define rc c[x][1]

template< typename T >
inline void Max(T &a,T &b){if(a<b) a=b;}
template< typename T>
inline void Min(T &a,T &b){if(a>b) a=b;}

const double pi=(double)acos(-1.0);
const double eps=(double)1e-8;
const int INF = (int) 0x3f3f3f3f;
const int MOD = (int) 1e9+7;
const int MAXN =(int) 2e5+10;
const int MAXM = (int) 3e6+10;

///--------------------START-------------------------
int N;
LL A,B,C;
char ans[MAXN];
char ch[MAXN][10];

void work(){
    char s[10];
    scanf("%d%lld%lld%lld",&N,&A,&B,&C);
    LL S=A+B+C;
    for(int i=1;i<=N;i++) scanf("%s",ch[i]);
    for(int i=1;i<=N;i++){
        strcpy(s,ch[i]);
//        printf("s:%s\n",s);
        if(s[0]=='A'&&s[1]=='B'){
            if(C==S){
                printf("No\n");
                return;
            }
            if(A==1&&B==1){
                if(ch[i+1][0]=='A'&&ch[i+1][1]=='C'&&C==0){
                    B--;
                    A++;
                    ans[i]='A';
                    continue;
                }
                if(ch[i+1][0]=='B'&&ch[i+1][1]=='C'&&C==0){
                    B++;
                    A--;
                    ans[i]='B';
                    continue;
                }
            }
            if(A>B){
                A--;
                B++;
                ans[i]='B';
            }
            else{
                A++;
                B--;
                ans[i]='A';
            }
        }
        else if(s[0]=='A'&&s[1]=='C'){
            if(B==S){
                printf("No\n");
                return;
            }
            if(A==1&&C==1){
                if(ch[i+1][0]=='A'&&ch[i+1][1]=='B'&&B==0){
                    C--;
                    A++;
                    ans[i]='A';
                    continue;
                }
                if(ch[i+1][0]=='B'&&ch[i+1][1]=='C'&&B==0){
                    C++;
                    A--;
                    ans[i]='C';
                    continue;
                }
            }
            if(A>C){
                A--;
                C++;
                ans[i]='C';
            }
            else{
                A++;
                C--;
                ans[i]='A';
            }
        }
        else{
            if(A==S){
                printf("No\n");
                return;
            }
            if(B==1&&C==1){
                if(ch[i+1][0]=='A'&&ch[i+1][1]=='B'&&A==0){
                    C--;
                    B++;
                    ans[i]='B';
                    continue;
                }
                if(ch[i+1][0]=='A'&&ch[i+1][1]=='C'&&A==0){
                    C++;
                    B--;
                    ans[i]='C';
                    continue;
                }
            }
            if(B>C){
                B--;
                C++;
                ans[i]='C';
            }
            else{
                B++;
                C--;
                ans[i]='B';
            }
        }
    }
    printf("Yes\n");
    for(int i=1;i<=N;i++){
        printf("%c\n",ans[i]);
    }
}


///--------------------END-------------------------
int main(){
#ifdef NNever
//freopen("data.in","r",stdin);
///freopen("out.txt","w",stdout);
#endif // NNever
    work();
    return 0;
}












Measured memory_bytes: 4836