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

#define AB	(0)
#define AC	(1)
#define BC	(2)

#define resA		(0)
#define resB		(1)
#define resC		(2)

#define false (1==0)
#define true	(1==1)

char search(int* S,int N,int A,int B,int C,int* route){
	if(A<0||B<0||C<0){
		return false;
	}
	if(N==0){
		return true;
	}
	switch(*S){
	case AB:
		if(search(S+1,N-1,A+1,B-1,C,route+1)){
			*route=resA;
			return true;
		}
		if(search(S+1,N-1,A-1,B+1,C,route+1)){
			*route=resB;
			return true;
		}
		break;
	case AC:
		if(search(S+1,N-1,A+1,B,C-1,route+1)){
			*route=resA;
			return true;
		}
		if(search(S+1,N-1,A-1,B,C+1,route+1)){
			*route=resC;
			return true;
		}
		break;
	case BC:
		if(search(S+1,N-1,A,B-1,C+1,route+1)){
			*route=resC;
			return true;
		}
		if(search(S+1,N-1,A,B+1,C-1,route+1)){
			*route=resB;
			return true;
		}
		break;
	}
	return false;
}

int main(){
	int N,A,B,C;
	int ret;
	ret=scanf("%d %d %d %d",&N,&A,&B,&C);
	int S[N];
	int route[N];
	for(int i=0;i<N;i++){
		char buf[3];
		scanf("%s",buf);
		if(!strcmp(buf,"AB")){
			S[i]=AB;
		}else if(!strcmp(buf,"AC")){
			S[i]=AC;
		}else if(!strcmp(buf,"BC")){
			S[i]=BC;
		}
	}
	ret=search(S,N,A,B,C,route);
	if(ret){
		printf("Yes\n");
		for(int i=0;i<N;i++){
			switch(route[i]){
			case resA:
				printf("A\n");
				break;
			case resB:
				printf("B\n");
				break;
			case resC:
				printf("C\n");
				break;
			}
		}
	}else{
		printf("No\n");
	}
	return 0;
}
