#include <bits/stdc++.h>
#define pub push_back
#define pii pair<int, int>
#define fst first
#define snd second
using namespace std;
int n, a, b, c; 
string s[100001] = {};
bool ck = 1;
vector<char> v;
inline void qry1(int x, string s)
{
	if (s == "AB")
	{
		if (a + b == 0) {ck = 0;}
		else if (a > b) {v[x] = 'B'; b++; a--;}
		else {v[x] = 'A'; a++; b--;}
	}
	else if (s == "AC")
	{
		if (a + c == 0) {ck = 0;}
		else if (a > c) {v[x] = 'C'; c++; a--;}
		else {v[x] = 'A'; a++; c--;}
	}
	else
	{
		if (b + c == 0) {ck = 0;}
		else if (c > b) {v[x] = 'B'; b++; c--;}
		else {v[x] = 'C'; c++; b--;}
	}
}
inline pii trans(string s)
{
	if (s == "AB") {return {0, 1};}
	else if (s == "BC") {return {1, 2};}
	else {return {0, 2};}
}
inline void upd(int x, int y)
{
	if (x == 0) {a++;}
	if (x == 1) {b++;}
	if (x == 2) {c++;}
	if (y == 0) {a--;}
	if (y == 1) {b--;}
	if (y == 2) {c--;}
}
int main()
{
	cin >> n >> a >> b >> c;
	v.pub('x');
	for (int i = n - 1; i >= 0; i--) {cin >> s[i]; v.pub('x');}

	if (a + b + c == 0) {ck = 0;}
	while (n && a + b + c == max({a, b, c}) && ck) {qry1(n - 1, s[n - 1]); n--;}
	int val[3] = {0, 0, 0}, idx[3] = {-1, -1, -1};
	if (b == 0) {val[0] = 1;} else if (c == 0) {val[0] = 2;}
	int j = 1;
	for (int i = 0; i < 3; i++)
	{
		if (i != val[0]) {val[j++] = i;}
	}
	for (int i = n - 1; i >= 0; i--)
	{
		pii ck = trans(s[i]);
		//cout << ck.fst << " " << ck.snd << "\n";
		if (ck.fst == val[0])
		{
			int id = (val[1] == ck.snd) ? 1 : 2;
			if (idx[2] != -1)
			{
				v[idx[2]] = (val[id] + 'A');
				idx[2] = -1;
				v[i] = (val[0] + 'A');
				idx[!(id - 1)] = v.size() - 1;
			}
			else if (idx[id - 1] != -1)
			{
				v[idx[id - 1]] = (val[0] + 'A');
				idx[id - 1] = -1;
				v[i] = (val[id] + 'A');
			}
			else {idx[id - 1] = i;}
		}
		else if (ck.snd == val[0])
		{
			int id = (val[1] == ck.fst) ? 1 : 2;
			if (idx[2] != -1)
			{
				v[idx[2]] = (val[id] + 'A');
				idx[2] = -1;
				v[i] = (val[0] + 'A');
				idx[!(id - 1)] = v.size() - 1;
			}
			else if (idx[id - 1] != -1)
			{
				v[idx[id - 1]] = (val[0] + 'A');
				idx[id - 1] = -1;
				v[i] = (val[id] + 'A');
			}
			else {idx[id - 1] = i;}
		}
		else
		{
			if (idx[2] != -1) 
			{
				v[idx[2]] = (ck.fst + 'A');
				idx[2] = -1;
				v[i] = (ck.snd + 'A');
			}
			else if (idx[0] != -1 && idx[1] != -1)
			{
				if (idx[0] > idx[1])
				{
					v[idx[0]] = (char)(val[0] + 'A');
					idx[0] = -1;
					v[idx[1]] = (char)(val[2] + 'A');
					idx[1] = -1;
					v[i] = (char)(val[1] + 'A');
				}
				else
				{
					v[idx[1]] = (char)(val[0] + 'A');
					idx[1] = -1;
					v[idx[0]] = (char)(val[1] + 'A');
					idx[0] = -1;
					v[i] = (char)(val[2] + 'A');
				}
			}
			else if (idx[0] != -1)
			{
				v[idx[0]] = (char)(val[0] + 'A');
				idx[0] = -1;
				v[i] = (char)(val[1] + 'A');
				idx[1] = v.size() - 1;
			}
			else if (idx[1] != -1)
			{
				v[idx[1]] = (char)(val[0] + 'A');
				idx[1] = -1;
				v[i] = (char)(val[2] + 'A');
				idx[0] = v.size() - 1;
			}
			else {idx[2] = i;}
		}
	}
	if (idx[0] != -1) {v[idx[0]] = (char)(val[0] + 'A');}
	if (idx[1] != -1) {v[idx[1]] = (char)(val[0] + 'A');}
	if (idx[2] != -1) {v[idx[2]] = (char)(val[1] + 'A');}
	if (ck) 
	{
		cout << "Yes\n";
		for (int i = v.size() - 2; i >= 0; i--) {cout << v[i] << "\n";}
	}
	else {cout << "No\n";}
	return 0;
}

Measured memory_bytes: 6880