#include<bits/stdc++.h>
using namespace std;

const int N = 1e5+7;

string s[N];
char ans[N];
int n;

void DFS(int x,int a,int b,int c)
{
	if(x>n){
		puts("Yes");
		for(int i=1;i<=n;i++) printf("%c\n",ans[i]);
		exit(0);
	}
	if(s[x]=="AB"){
		if(a) ans[x] = 'B', DFS(x+1,a-1,b+1,c);		//两个选择爆搜 
		if(b) ans[x] = 'A', DFS(x+1,a+1,b-1,c);
	}
	else if(s[x]=="AC"){
		if(a) ans[x] = 'C', DFS(x+1,a-1,b,c+1);
		if(c) ans[x] = 'A', DFS(x+1,a+1,b,c-1);
	}
	else {
		if(b) ans[x] = 'C', DFS(x+1,a,b-1,c+1);
		if(c) ans[x] = 'B', DFS(x+1,a,b+1,c-1);
	}
}


int main()
{
	int a,b,c;
	cin>>n>>a>>b>>c;
	for(int i=1;i<=n;i++) cin>>s[i];
	DFS(1,a,b,c);
	puts("No");
	return 0;
}