#include<stdio.h>
#include<string.h>

int main(void){
    register int i;
    int n;
    scanf("%d",&n);
    long abc[3];
    for(i = 0;i < 3;i++)scanf("%ld",&abc[i]);
    char s[n][3];
    for(i = 0;i < n;i++)scanf("%s",s[i]);
    char ans[n];
    int i0,i1,i0_ = 0,i1_ = 1;
    for(i = 0;i < n;i++){
        if(!strcmp("AB",s[i])){i0 = 0;i1 = 1;}
        else if(!strcmp("AC",s[i])){i0 = 0;i1 = 2;}
        else{i0 = 1;i1 = 2;}

        if(!abc[i0] && !abc[i1]){
            puts("No");
            return 0;
        }
        
        if(!abc[i0] || !abc[i1]){
            if(!abc[i0]){
                abc[i0]++; abc[i1]--;
                ans[i] = 'A' + i0;
            }else{
                abc[i0]--; abc[i1]++;
                ans[i] = 'A' + i1;
            }
            continue;
        }
        if(i == n-1)goto skip;
        if(!strcmp("AB",s[i+1])){i0_ = 0;i1_ = 1;}
        else if(!strcmp("AC",s[i+1])){i0_ = 0;i1_ = 2;}
        else{i0_ = 1;i1_ = 2;}
        skip:
        if(i0 == i0_ || i0 == i1_){
            abc[i0]++; abc[i1]--;
            ans[i] = 'A' + i0;
        }else{
            abc[i0]--; abc[i1]++;
            ans[i] = 'A' + i1;
        }
    }
    puts("Yes");
    for(i = 0;i < n;i++)printf("%c\n",ans[i]);
}
