#include<iostream>
#include<math.h>
#include<algorithm>
#include<stdint.h>
#include<vector>
#include<deque>
#include<stack>
#include<functional>
#include<string>
#include<cstring>
#include<time.h>
#include<array>
#include<iomanip>
#include<list>
#include<set>
#include<map>
#include<random>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include <queue>


using namespace std;
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;
using ldb = long double;


//BDD,ZDD,kdtree, bdtree,bicalc, bolonoy, doloney, tree, chinesemod,segmenttree,daikusutora, saidairyuu, 2bugurahu, heirokenshutu, topologicalsort, kyourenketuseibun

#define REP(i,a,b) for(ll i = a; i < b; ++i)
#define PRI(s) cout << s << endl
#define PRIF(v, n) printf("%."#n"f\n", v)
#define PRIY PRI("Yes")
#define PRIN PRI("No")
#define MINS(a,b) a = min(a,(decltype(a))(b))
#define MAXS(a,b) a = max(a,(decltype(a))(b))

bool check(array<ll, 3> state, int q1, int q2, int q3) {

	REP(i, 0, 2) {
		auto arr = state;
		bool a = i % 2 == 0;
		if (a) {
			arr[q1]++;
			arr[(q1 + 1) % 3]--;
		}
		else {
			arr[q1]--;
			arr[(q1 + 1) % 3]++;
		}
		int plus = 0;
		bool minus = false;
		REP(i, 0, 3) {
			if (arr[i] < 0) minus = true;
			if (arr[i] > 0)++plus;
		}
		if (!minus && plus >= 2) return a;
	}
	REP(i, 0, 2) {
		REP(j, 0, 2) {
			auto arr = state;
			bool a = i % 2 == 0;
			bool b = j % 2 == 0;
			if (a) {
				arr[q1]++;
				arr[(q1 + 1) % 3]--;
			}
			else {
				arr[q1]--;
				arr[(q1 + 1) % 3]++;
			}
			if (b) {
				arr[q2]++;
				arr[(q2 + 1) % 3]--;
			}
			else {
				arr[q2]--;
				arr[(q2 + 1) % 3]++;
			}
			int plus = 0;
			bool minus = false;
			REP(i, 0, 3) {
				if (arr[i] < 0) minus = true;
				if (arr[i] > 0)++plus;
			}
			if (!minus && plus >= 2) return a;
		}
	}
	REP(i, 0, 2) {
		REP(j, 0, 2) {
			REP(k, 0, 2) {
				auto arr = state;
				bool a = i % 2 == 0;
				bool b = j % 2 == 0;
				bool c = k % 2 == 0;
				if (a) {
					arr[q1]++;
					arr[(q1 + 1) % 3]--;
				}
				else {
					arr[q1]--;
					arr[(q1 + 1) % 3]++;
				}
				if (b) {
					arr[q2]++;
					arr[(q2 + 1) % 3]--;
				}
				else {
					arr[q2]--;
					arr[(q2 + 1) % 3]++;
				}
				if (c) {
					arr[q3]++;
					arr[(q3 + 1) % 3]--;
				}
				else {
					arr[q3]--;
					arr[(q3 + 1) % 3]++;
				}
				int plus = 0;
				bool minus = false;
				REP(i, 0, 3) {
					if (arr[i] < 0) minus = true;
					if (arr[i] > 0)++plus;
				}
				if (!minus && plus >= 2) return a;
			}
		}
	}
	ll ans = 0;
	REP(i, 0, 1e12)ans = ans * ans;
	return ans % 1782 == 0;
}
int stoq(string s) {
	if (s == "AB")return 0;
	else if (s == "BC")return 1;
	return 2;
}
int main() {
	ll N, A, B, C;
	cin >> N >> A >> B >> C;
	array<ll, 3> s = { A,B,C };
	vector<int> ans(N);
	vector<int> query(N);
	REP(i, 0, N) {
		string str;
		cin >> str;
		query[i] = stoq(str);
	}
	REP(i, 0, N) {
		if (s[query[i]] == 0 && s[(query[i] + 1) % 3] == 0) {
			PRIN;
			return 0;
		}
		int zeroc = 0;
		REP(j, 0, 3)if (s[j] == 0) ++zeroc;
		if (zeroc == 1) {
			bool ret = check(s, query[i], i + 1 <= N - 1 ? query[i + 1] : 0, i + 2 <= N - 1 ? query[i + 2] : 0);
			if (ret) {
				s[query[i]]++;
				s[(query[i] + 1) % 3]--;
				ans[i] = query[i];
			}
			else {
				s[query[i]]--;
				s[(query[i] + 1) % 3]++;
				ans[i] = (query[i] + 1) % 3;
			}
		}
		else {
			if (s[query[i]] <= s[(query[i] + 1) % 3]) {
				s[query[i]]++;
				s[(query[i] + 1) % 3]--;
				ans[i] = query[i];
			}
			else {
				s[query[i]]--;
				s[(query[i] + 1) % 3]++;
				ans[i] = (query[i] + 1) % 3;
			}
		}
	}
	PRIY;
	for (int a : ans) {
		if (a == 0) PRI("A");
		else if (a == 1)PRI("B");
		else PRI("C");
	}
	return 0;
}

Measured memory_bytes: 4048