//#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
/*#pragma GCC optimize("section-anchors")
#pragma GCC optimize("profile-values,profile-reorder-functions,tracer")
#pragma GCC optimize("vpt")
#pragma GCC optimize("rename-registers")
#pragma GCC optimize("move-loop-invariants")
#pragma GCC optimize("unswitch-loops")
#pragma GCC optimize("function-sections")
#pragma GCC optimize("data-sections")
#pragma GCC optimize("branch-target-load-optimize")
#pragma GCC optimize("branch-target-load-optimize2")
#pragma GCC optimize("btr-bb-exclusive")*/
//#pragma comment(linker, "/STACK:367077216")
#define _CRT_SECURE_NO_WARNINGS
#include <chrono>
#include <set>
#include <map>
#include <deque>
#include <string>
#include <cstdint>
#include <cmath>
#include <queue>
#include <cassert>
#include <random>
#include <bitset>
#include <iomanip>
#include <numeric>
#include <time.h>//////////////
#include <ctime>
#include <string>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
//++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++
//#define endl '\n'
#define mp make_pair
#define pbc push_back
#define pob pop_back()
#define empb emplace_back
#define queuel queue<long long>
#define sqr(a) ((a) * (a))
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pin(p) cin >> p.first >> p.second;
#define uniq(a) sort(all(a));(a).resize(unique(all(a)) - a.begin());
#define rev(v) reverse(v.begin(), v.end());
#define sout(s, c) for (auto i : s) cout << i << c;
#define pout(p) cout << p.first << " " << p.second;
#define er(v, l, r) erase(v.begin() + l, v.begin() + r);
#define vin(v) for (ll i = 0; i < v.size(); ++i) cin >> v[i];
#define vout(v, c) for (int i = 0; i < v.size(); ++i) cout << v[i] << c;
#define pushi(v, a) for (int i = 0; i < a.size(); ++i) v.push_back(a[i]);
#define fastio() ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0); srand(time(NULL))
#define dab(v) for(auto i:v)cout<<i<<' ';
#define sp system("pause")
//++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++
using namespace std;
//++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
//++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++
const ld EPS = 1e-9;
const ld EPS2 = 1e-6;
const ld PI = acos(-1);
const int MOD7 = 1000000007;
const int MOD9 = 1000000009;
const int a228 = 18;
const int inf = 1e9;
const ll kekmod = 1791791791;
const ll bestmod = 1148822869;
const ll INF = 4e18;
const int mod = 998244353;

signed main()
{
	fastio();
	int n, a, b, c;
	cin >> n >> a >> b >> c;
	vector<string> d(n);
	vin(d);
	if (a + b + c == 2)
	{
		vector<vector<vector<vector<int>>>> dp(n + 1, vector<vector<vector<int>>>(3, vector<vector<int>>(3, vector<int>(3))));
		vector<vector<vector<vector<char>>>> p(n + 1, vector<vector<vector<char>>>(3, vector<vector<char>>(3, vector<char>(3))));
		dp[0][a][b][c] = 1;
		for (int i = 0; i < n; ++i)
		{
			for (int aa = 0; aa <= 2; ++aa)
			{
				for (int bb = 0; bb <= 2; ++bb)
				{
					for (int cc = 0; cc <= 2; ++cc)
					{
						if (!dp[i][aa][bb][cc]) continue;
						if (d[i] == "AB")
						{
							if (aa - 1 >= 0)
							{
								dp[i + 1][aa - 1][bb + 1][cc] = 1;
								p[i + 1][aa - 1][bb + 1][cc] = 'B';
							}
							if (bb - 1 >= 0)
							{
								dp[i + 1][aa + 1][bb - 1][cc] = 1;
								p[i + 1][aa + 1][bb - 1][cc] = 'A';
							}
						}
						else  if (d[i] == "AC")
						{
							if (aa - 1 >= 0)
							{
								dp[i + 1][aa - 1][bb][cc + 1] = 1;
								p[i + 1][aa - 1][bb][cc + 1] = 'C';
							}
							if (cc - 1 >= 0)
							{
								dp[i + 1][aa + 1][bb][cc - 1] = 1;
								p[i + 1][aa + 1][bb][cc - 1] = 'A';
							}
						}
						else
						{
							if (bb - 1 >= 0)
							{
								dp[i + 1][aa][bb - 1][cc + 1] = 1;
								p[i + 1][aa][bb - 1][cc + 1] = 'C';
							}
							if (cc - 1 >= 0)
							{
								dp[i + 1][aa][bb + 1][cc - 1] = 1;
								p[i + 1][aa][bb + 1][cc - 1] = 'B';
							}
						}
					}
				}
			}
		}
		vector<char> ans;
		for (int aa = 0; aa <= 2; ++aa)
		{
			for (int bb = 0; bb <= 2; ++bb)
			{
				for (int cc = 0; cc <= 2; ++cc)
				{
					if (dp[n][aa][bb][cc])
					{
						cout << "Yes" << endl;
						int ta = aa, tb = bb, tc = cc;
						int tn = n;
						while (tn)
						{
							char xx = p[tn][ta][tb][tc];
							int tta = ta, ttb = tb, ttc = tc;
							int ttn = tn - 1;
							ans.pbc(xx);
							if (d[tn - 1] == "AB")
							{
								if (xx == 'A') tta--, ttb++;
								else tta++, ttb--;
							}
							else if (d[tn - 1] == "AC")
							{
								if (xx == 'A') tta--, ttc++;
								else tta++, ttc--;
							}
							else
							{
								if (xx == 'B') ttb--, ttc++;
								else ttb++, ttc--;
							}
							tn = ttn, ta = tta, tb = ttb, tc = ttc;
						}
						rev(ans);
						vout(ans, '\n');
						sp;
						return 0;
					}
				}
			}
		}
		cout << "No";
		return 0; 
	}
	vector<char> ans;
	for (int i = 0; i < n; ++i)
	{
		string s = d[i];
		if (s == "AB")
		{
			if (a == 0 && b == 0)
			{
				cout << "No";
				sp;
				return 0;
			}
			if (a > b)
			{
				ans.pbc('B');
				b++;
				a--;
			}
			else
			{
				ans.pbc('A');
				a++;
				b--;
			}
		}
		else if (s == "AC")
		{
			if (a == 0 && c == 0)
			{
				cout << "No";
				sp;
				return 0;
			}
			if (a > c)
			{
				ans.pbc('C');
				c++;
				a--;
			}
			else
			{
				ans.pbc('A');
				a++;
				c--;
			}
		}
		else
		{
			if (c == 0 && b == 0)
			{
				cout << "No";
				sp;
				return 0;
			}
			if (c > b)
			{
				ans.pbc('B');
				b++;
				c--;
			}
			else
			{
				ans.pbc('C');
				c++;
				b--;
			}
		}
	}
	cout << "Yes" << endl;
	vout(ans, '\n');
	sp;
}

Measured memory_bytes: 128988