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

#define int ll

#define pb push_back
#define all(v) (v).begin(), (v).end() 
#define sz(v) (int)((v).size())
#define fs first
#define sd second

typedef long long ll;

typedef pair < int, int > pi;
typedef pair < pi, int > ppi;

typedef vector < int > vi;
typedef vector < vector < int > > vvi;
typedef vector < pi > vpi;
typedef vector < vpi > vvpi;
typedef vector < ppi > vppi;

void fast() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}

vector<string> vec_splitter(string s) {
	s += ',';
	vector<string> res;
	while(!s.empty()) {
		res.push_back(s.substr(0, s.find(',')));
		s = s.substr(s.find(',') + 1);
	}
	return res;
}

void debug_out(
vector<string> __attribute__ ((unused)) args,
__attribute__ ((unused)) int idx, 
__attribute__ ((unused)) int LINE_NUM) { cerr << endl; } 
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
	if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") ";
	stringstream ss; ss << H;
	cerr << args[idx] << " = " << ss.str();
	debug_out(args, idx + 1, LINE_NUM, T...);
}

#ifdef LOCAL
#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__)
#else
#define debug(...) 42
#endif

double get_time() {
	return 1.0 * clock() / CLOCKS_PER_SEC;
}

const int MAX = 1E3;

int32_t main() {
	int n, a, b, c;
	cin >> n >> a >> b >> c;
	string res, s[n];
	for(int i = 0; i < n; i++)
		cin >> s[i];
	for(int i = 0; i < n; i++) {
		if(s[i] == "AB") {
			if(a + b == 0) {
				cout << "No";
				return 0;
			}
			if(a > 1) {
				--a, ++b;
				res += "B";
			}
			else if(b > 1) {
				res += "A";
				//cout << "A\n";
				--b, ++a;
			}
			else if(a == 1 && b == 1 && i + 1 < n) {
				if(s[i + 1] == "AC") {
					res += "A";
					++a, --b;
				}
				else {
					res += "B";
					++b, --a;
				}
			}
			else if(a == 1) {
				res += "B";
				//cout << "B\n";
				++b, --a;
			}
			else {
				res += "A";
				//cout << "A\n";
				--b, ++a;
			}
		}
		else if(s[i] == "AC") {
			if(a + c == 0) {
				cout << "No";
				return 0;
			}
			if(a > 1) {
				res += "C";
				--a, ++c;
				//cout << "C\n";
			}
			else if(c > 1) {
				res += "A";
				//cout << "A\n";
				--c, ++a;
			}
			else if(a == 1 && c == 1 && i + 1 < n) {
				if(s[i + 1] == "AB") {
					res += "A";
					++a, --c;
				}
				else {
					res += "C";
					++c, --a;
				}
			}
			else if(a == 1) {
				res += "C";
				//cout << "C\n";
				++c, --a;
			}
			else {
				res += "A";
				//cout << "A\n";
				--c, ++a;
			}
		}
		else {
			if(b + c == 0) {
				cout << "No";
				return 0;
			}
			if(b > 1) {
				res += "C";
				--b, ++c;
				//cout << "C\n";
			}
			else if(c > 1) {
				res += "B";
				//cout << "B\n";
				--c, ++b;
			}
			else if(b == 1 && c == 1 && i + 1 < n) {
				if(s[i + 1] == "AB") {
					res += "B";
					++b, --c;
				}
				else {
					res += "C";
					++c, --b;
				}
			}
			else if(b == 1) {
				res += "C";
				//cout << "C\n";
				++c, --b;
			}
			else {
				res += "B";
				//cout << "B\n";
				--c, ++b;
			}
		}
	}
	cout << "Yes\n";
	for(int i = 0; i < n; i++)
		cout << res[i] << '\n';
}


Measured memory_bytes: 6892