#include <bits/stdc++.h>
using namespace std;
string s[100005];
int main()
{
	int n,a[3];
	cin >> n >> a[0] >> a[1] >> a[2];
	for (int i=0;i<n;i++)
	cin >> s[i];
	vector<char> v;
	for (int i=0;i<n;i++)
	{
		if (!a[s[i][0]-'A'] && !a[s[i][1]-'A'])
		{
			cout << "No";
			return 0;
		}
		if (a[s[i][0]-'A']>a[s[i][1]-'A'])
		swap(s[i][0],s[i][1]);
		char add=s[i][0];
		if (a[s[i][0]-'A']==1 && a[s[i][1]-'A']==1 && i!=n-1 && s[i+1].find(add)==-1)
		add=s[i][1];
		v.push_back(add);
		a[add-'A']++;
		a[(s[i][0]^s[i][1]^add)-'A']--;
	}
	cout << "Yes";
	for (char c:v)
	cout << endl << c;
}