#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using uint = unsigned int;
using ull = unsigned long long;

template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;

constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;
constexpr int mod2 = 998244353;
template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }
template<typename T>
bool isin(T y, T x, T h, T w) { return (0 <= y && 0 <= x && y < h && x < w); }
template<typename T>
bool isin1(T y, T x, T h, T w) { return (0 < y && 0 < x && y <= h && x <= w); }

template<typename T>
ostream& operator <<(ostream &os, vector<T> &v) {
	os << v[0];
	for (int i = 1; i < v.size(); i++) os << " " << v[i];
	return (os);
}

template<typename T>
istream& operator >>(istream &is, vector<T> &v) {
	for (auto &u : v) is >> u;
	return (is);
}

template<typename T1, typename T2>
istream& operator >>(istream &is, pair<T1, T2> &p) {
	return (is >> p.first >> p.second);
}


void Main() {
	ll N, A, B, C; cin >> N >> A >> B >> C;
	if (A+B+C > 3) {
		string ans;
		vector<string> S(N); cin >> S;
		for (int i = 0; i < N; i++) {
			if (S[i] == "AB") {
				if (A == 0 && B == 0) { cout << "No" << el; return; }
				if (A > B) { ans += 'B'; B++, A--; }
				else { ans += 'A'; A++, B-- ; }
			}
			if (S[i] == "AC") {
				if (A == 0 && C == 0) { cout << "No" << el; return; }
				if (A > C) { ans += 'C'; C++; A--; }
				else { ans += 'A'; A++; C--; }
			}
			if (S[i] == "BC") {
				if (B == 0 && C == 0) { cout << "No" << el; return; }
				if (B > C) { ans += 'C'; C++; B--; }
				else { ans += 'B'; C--; B++; }
			}
		}
		cout << "Yes" << el;
		for (int i = 0; i < N; i++) {
			cout << ans[i] << el;
		}
	} else {
		//操作の情報とか入れとけばいいんじゃない
		vector<vvvint> dp(N+1, vvvint(8, vvint(8, vint(8, -1)))); 
		dp[0][A][B][C] = 3;
		string ans;
		for (int i = 0; i < N; i++) {
			string S; cin >> S;
			for (int a = 0; a < 4; a++) {
				for (int b = 0; b < 4; b++) {
					for (int c = 0; c < 4; c++) {
						if (dp[i][a][b][c] == -1) continue;
						if (S == "AB") {
							if (a == 0 && b == 0) continue;
							if (a > 0) dp[i+1][a-1][b+1][c] = 1;
							if (b > 0) dp[i+1][a+1][b-1][c] = 0;
						}
						if (S == "AC") {
							if (a == 0 && c == 0) continue;
							if (a > 0) dp[i+1][a-1][b][c+1] = 2;
							if (c > 0) dp[i+1][a+1][b][c-1] = 0;
						}
						if (S == "BC") {
							if (b == 0 && c == 0) continue;
							if (b > 0) dp[i+1][a][b-1][c+1] = 2;
							if (c > 0) dp[i+1][a][b+1][c-1] = 1;
						}
					}
				}
			}
		}
		
		int pa = -1, pb = -1, pc = -1;
		for (int a = 0; a < 4; a++) {
			for (int b = 0; b < 4; b++) {
				for (int c = 0; c < 4; c++) {
					if (dp[N][a][b][c] != -1) {
						pa = a; pb = b; pc = c;
					}
				}
			}
		}
		if (pa == -1) { cout << "No" << el; return; }
			
		for (int i = N-1; i >= 0; i--) {
			//cout << pa << " " << pb << " " << pc << el;
			if (dp[i+1][pa][pb][pc] == 0) {
				ans += 'A';
				pa--;
				if (dp[i][pa][pb+1][pc] != -1) {
					pb++;
				} else {
					pc++;
				}
			}
			if (dp[i+1][pa][pb][pc] == 1) {
				ans += 'B';
				pb--;
				if (dp[i][pa+1][pb][pc] != -1) {
					pa++;
				} else {
					pc++;
				}
			}
			if (dp[i+1][pa][pb][pc] == 2) {
				ans += 'C';
				pc--;
				if (dp[i][pa+1][pb][pc] != -1) {
					pa++;
				} else {
					pb++;
				}
			}
		}
		cout << "Yes" << el;
		reverse(begin(ans), end(ans));
		for (int i = 0; i < ans.size(); i++) {
			cout << ans[i] << el;
		}
	}
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);
	cout << fixed << setprecision(20);
	Main();
	return (0);
}


Measured memory_bytes: 488744