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

const int CMDLEN = 2;

char execAB(int *, int *);
char execAC(int *, int *);
char execBC(int *, int *);
int searCh(char *, char);

char execAB(int *a, int *b)
{
    if ( (*a) + 1 > 0 && (*b) - 1 > 0 )
    {
        (*a)++;
        (*b)--;
        return 'A';
    }
    if ( (*a) - 1 > 0 && (*b) + 1 > 0 )
    {
        (*a)--;
        (*b)++;
        return 'B';
    }
    if ( *a <= 0 && *b <= 0 )
    {
        return 'N';
    }
}

char execAC(int *a, int *c)
{
    if ( (*a) + 1 > 0 && (*c) - 1 > 0 )
    {
        (*a)++;
        (*c)--;
        return 'A';
    }
    if ( (*a) - 1 > 0 && (*c) + 1 > 0 )
    {
        (*a)--;
        (*c)++;
        return 'C';
    }
    if ( *a <= 0 && *c <= 0 )
    {
        return 'N';
    }
}

char execBC(int *b, int *c)
{
    if ( (*b) + 1 > 0 && (*c) - 1 > 0 )
    {
        (*b)++;
        (*c)--;
        return 'B';
    }
    if ( (*b) - 1 > 0 && (*c) + 1 > 0 )
    {
        (*b)--;
        (*c)++;
        return 'C';
    }
    if ( *b <= 0 && *c <= 0 )
    {
        return 'N';
    }
}

int searCh(char *array, char target)
{
    int i = 0;
    for ( i = 0; i < strlen(array); i++ )
    {
        if ( array[i] == target ) return 1;
    }
    return 0;
}

int main(int argc, const char **argv)
{
    int cmds = 0, a = 0, b = 0, c = 0, loop = 0;
    char *cmd = NULL, *result = NULL;

    fscanf(stdin, "%d %d %d %d", &cmds, &a, &b, &c);
    result = (char *) malloc(cmds);

    for ( loop = 0; loop < cmds; loop++ )
    {
        cmd = (char *) malloc(CMDLEN);
        fscanf(stdin, "%s", cmd);

        if ( ! strcmp(cmd, "AB") )
            result[ loop ] = execAB(&a, &b);
        if ( ! strcmp(cmd, "AC") )
            result[ loop ] = execAC(&a, &c);
        if ( ! strcmp(cmd, "BC") )
            result[ loop ] = execBC(&b, &c);

        free(cmd);
    }

    if ( searCh(result, 'N') ) fprintf(stdout, "No\n");
    else
    {
        fprintf(stdout, "Yes\n");
        for ( loop = 0; loop < strlen(result); loop++ )
            fprintf(stdout, "%c\n", result[ loop ]);
    }
    

    free(result);
    return 0;
}