#include<stdio.h>
#include<stdlib.h>
#define datatype char
#define max 100001

struct queue{
	int head;
	int tail;
	datatype item[max];
};

struct queue* initQueue(struct queue *p){
	p = (struct queue *)malloc(sizeof(struct queue));
	p->head = p->tail = 0;
	return p;
}

int emptyQueue(struct queue *p){
	return p->head == p->tail;
}

void resetQueue(struct queue *p){
	p->head = 0;
	p->tail = 0;
}

void enqueue(struct queue *p, datatype a){
	if(p->tail >= max){
		printf("overflow\n");
		exit(1);
	}else{
		p->item[p->tail] = a;
		p->tail++;
	}
}

datatype dequeue(struct queue *p){
	datatype a;
	if(emptyQueue(p)){
		printf("underflow\n");
		exit(1);
	}
	a = p->item[p->head];
	p->head++;
	return a;
}

void printQueue(struct queue *p){
	while(emptyQueue(p) == 0){
		printf("%c\n", dequeue(p));
	}
}

int main(){
	char s[3];
	long long int N, A, B, C;
	scanf("%lld %lld %lld %lld", &N, &A, &B, &C);
	if(A+B+C != 0){
		struct queue *q;
		q = initQueue(q);
		long long int i = 0;
		int j = 0;
	
		for(i = 0; i < N; i++){
			scanf("%s", s);
			//printf("now, s = %s\n", s);
			if(s[0] == 'A' && s[1] == 'C'){
				if(A > 0 && C > 0){
					A++;
					C--;
					enqueue(q, 'A');
				}else if(A > 0){
					A--;
					C++;
					enqueue(q, 'C');
				}else if(C > 0){
					A++;
					C--;
					enqueue(q, 'A');
				}else{
					j = 1;
					break;
				}
			}else if(s[0] == 'B' && s[1] == 'C'){
				if(B > 0 && C > 0){
					B++;
					C--;
					enqueue(q, 'B');
				}else if(C > 0){
					C--;
					B++;
					enqueue(q, 'B');
				}else if(B > 0){
					B--;
					C++;
					enqueue(q, 'C');
				}else{
					j = 1;
					break;
				}
			}else if(s[0] == 'A' && s[1] == 'B'){
				if(A > 0 && B > 0){
					A++;
					B--;
					enqueue(q, 'A');
				}else if(B > 0){
					B--;
					A++;
					enqueue(q, 'A');
				}else if(A > 0){
					A--;
					B++;
					enqueue(q, 'B');
				}else{
					j = 1;
					break;
				}
			}else{
				
			}
		}
	}else{
		j = 1;
	}
	
	if(j == 1){
		printf("No\n");
	}else{
		printf("Yes\n");
		printQueue(q);
	}
}