#pragma region
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <list>
#include <iomanip>
#include <cstdint>
#include <cstdlib>

using namespace std;
typedef long long ll;
//#define rep(i, s, e) for (int(i) = (s); (i) < (e); ++(i))
#define rep(i, e) for (int(i) = 0; (i) < (e); ++(i))
#define rrep(i, s) for (int(i) = (s) - 1; (i) >= 0; --(i))
#define all(x) x.begin(),x.end()
#pragma endregion

int n, a, b, c;
bool check(string now)
{
	if (now == "AB" && a <= 0 && b <= 0)
	{
		cout << "No" << endl;
		return false;
	}
	else if (now == "AC" && a <= 0 && c <= 0)
	{
		cout << "No" << endl;
		return false;
	}
	else if (now == "BC" && b <= 0 && c <= 0)
	{
		cout << "No" << endl;
		return false;
	}
	else return true;
}

int main()
{
	cin >> n >> a >> b >> c;
	vector<string> s(n); rep(i, n)cin >> s[i];
	vector<string> res;
	if (!check(s[0]))return 0;
	rep(i, n - 1)
	{
		if (!check(s[i]))return 0;
		if (s[i] == "AB")
		{
			if (a == 0)
			{
				++a, --b;
				res.push_back("A");
			}
			else if (b == 0)
			{
				--a, ++b;
				res.push_back("B");
			}
			else
			{
				if (s[i + 1] == "AB")
				{
					if (a < b)
					{
						++a, --b;
						res.push_back("A");
					}
					else
					{
						--a, ++b;
						res.push_back("B");
					}
				}
				else if (s[i + 1] == "BC")
				{
					if (b == 1)
					{
						--a, ++b;
						res.push_back("B");
					}
					else if (a < b)
					{
						++a, --b;
						res.push_back("A");
					}
					else
					{
						--a, ++b;
						res.push_back("B");
					}
				}
				else
				{
					if (a == 1)
					{
						++a, --b;
						res.push_back("A");
					}
					else if (a < b)
					{
						++a, --b;
						res.push_back("A");
					}
					else
					{
						--a, ++b;
						res.push_back("B");
					}
				}
			}
		}
		else if(s[i]=="BC")
		{
			if (b == 0)
			{
				++b, --c;
				res.push_back("B");
			}
			else if (c == 0)
			{
				--b, ++c;
				res.push_back("C");
			}
			else
			{
				if (s[i + 1] == "AB")
				{
					if (b == 1)
					{
						++b, --c;
						res.push_back("B");
					}
					else if (b < c)
					{
						++b, --c;
						res.push_back("B");
					}
					else
					{
						--b, ++c;
						res.push_back("C");
					}
				}
				else if (s[i + 1] == "BC")
				{
					if (b < c)
					{
						++b, --c;
						res.push_back("B");
					}
					else
					{
						--b, ++c;
						res.push_back("C");
					}
				}
				else
				{
					if (c == 1)
					{
						--b, ++c;
						res.push_back("C");
					}
					else if (b < c)
					{
						++b, --c;
						res.push_back("B");
					}
					else
					{
						--b, ++c;
						res.push_back("C");
					}
				}
			}
		}
		else
		{
			if (a == 0)
			{
				++a, --c;
				res.push_back("A");
			}
			else if (c == 0)
			{
				--a, ++c;
				res.push_back("C");
			}
			else
			{
				if (s[i + 1] == "AB")
				{
					if (a == 1)
					{
						++a, --c;
						res.push_back("A");
					}
					else if (a < c)
					{
						++a, --c;
						res.push_back("A");
					}
					else
					{
						--a, ++c;
						res.push_back("C");
					}
				}
				else if (s[i + 1] == "BC")
				{
					if (c == 1)
					{
						--a, ++c;
						res.push_back("C");
					}
					else if (a < c)
					{
						++a, --c;
						res.push_back("A");
					}
					else
					{
						--a, ++c;
						res.push_back("C");
					}
				}
				else
				{
					if (a < c)
					{
						++a, --c;
						res.push_back("A");
					}
					else
					{
						--a, ++c;
						res.push_back("C");
					}
				}
			}

		}
	}
	if (!check(s[n - 1]))return 0;
	if (s[n - 1] == "AB")
	{
		if (a < b)res.push_back("A");
		else res.push_back("B");
	}
	else if (s[n - 1] == "BC")
	{
		if (b < c)res.push_back("B");
		else res.push_back("C");
	}
	else
	{
		if (a < c)res.push_back("A");
		else res.push_back("C");
	}
	cout << "Yes" << endl;
	rep(i, n)cout << res[i] << endl;
}

Measured memory_bytes: 10596