#include <iostream>
using namespace std;
#define OPTIMISE ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);

int a,b,c,n;
const int M = 1e5+100;
string s[M];
char ans[M];

void dfs(int i, int a, int b, int c) {
	if (i == n) {
		cout << "Yes\n";
		for (int i = 0; i < n; i++)
			cout << ans[i] << "\n";
		exit(0);
	}
	if (s[i] == "AB") {
		if (a) ans[i] = 'B', dfs(i+1,a-1,b+1,c);
		if (b) ans[i] = 'A', dfs(i+1,a+1,b-1,c);
	}
	if (s[i] == "BC") {
		if (b) ans[i] = 'C', dfs(i+1,a,b-1,c+1);
		if (c) ans[i] = 'B', dfs(i+1,a,b+1,c-1);
	}
	if (s[i] == "AC") {
		if (a) ans[i] = 'C', dfs(i+1,a-1,b,c+1);
		if (c) ans[i] = 'A', dfs(i+1,a+1,b,c-1);
	}
}

int main() {
	OPTIMISE;

	cin >> n >> a >> b >> c;
	for (int i = 0; i < n; i++)
		cin >> s[i];
	dfs(0,a,b,c);
	cout << "No";
}