#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5+5;
string s[N];
char ans[N];
ll n,aa,bb,cc;
void dfs(int x,ll a,ll b,ll c)
{
	if(x==n+1)
	{
		cout<<"Yes"<<endl;
		for(int i=1;i<=n;i++)
		cout<<ans[i]<<endl;
		exit(0);
	}
	if(s[x]=="AB")
	{
		if(b)ans[x]='A',
		dfs(x+1,a+1,b-1,c);
		if(a)ans[x]='B',
		dfs(x+1,a-1,b+1,c);
	}
	else if(s[x]=="AC")
	{
		if(c)ans[x]='A',
		dfs(x+1,a+1,b,c-1);
		if(a)ans[x]='C',
		dfs(x+1,a-1,b,c+1);
	}
	else
	{
		if(c)ans[x]='B',
		dfs(x+1,a,b+1,c-1);
		if(b)ans[x]='C',
		dfs(x+1,a,b-1,c+1);
	}
}
int main()
{
	cin>>n>>aa>>bb>>cc;
	for(int i=1;i<=n;i++)cin>>s[i];
	dfs(1,aa,bb,cc);
	cout<<"No";
	return 0;
}
