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

int main(void){
    register int i,j;
    int in;
    long n[3];
    scanf("%d%ld%ld%ld",&in,&n[0],&n[1],&n[2]);
    char s[in][3];
    char ans[in];
    for(i = 0;i < in;i++)scanf("%s",s[i]);
    long abc = n[0] + n[1] + n[2];
    for(i = 0;i < 3;i++)if(!(abc - n[i])){
        puts("No");
        return 0;
    }
    for(i = 0;i < in;i++){
        int i0,i1;
        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(n[i0] < n[i1]){
            n[i0]++; n[i1]--;
            ans[i] = 'A' + i0;
        }else{
            n[i0]--; n[i1]++;
            ans[i] = 'A' + i1;
        }
        for(j = 0;j < 3;j++)if(n[j] < 0){
            puts("No");
            return 0;
        }
    }
    puts("Yes");
    for(i = 0;i < in;i++)printf("%c\n",ans[i]);
}