#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(V) V.begin(),V.end()
#define MOD 1000000007

int main() {
	int N;
	cin >> N;
	ll A, B, C;
	cin >> A >> B >> C;
	string S;
	if (A == 0 && B == 0 && C == 0) {
		cout << "No" << endl;
		return 0;
	}
	queue<char> Q;
	if (A + B + C == 1) {
		for (int i = 0;i < N;i++) {
			cin >> S;
			if (S == "AB") {
				if (A == 0 && B == 0) {
					cout << "No" << endl;
					return 0;
				}
				if (A) {
					Q.push('B');
					A--;
					B++;
				}
				else {
					Q.push('A');
					A++;
					B--;
				}
			}

			if (S == "AC") {
				if (A == 0 && C == 0) {
					cout << "No" << endl;
					return 0;
				}
				if (A) {
					Q.push('C');
					A--;
					C++;
				}
				else {
					Q.push('A');
					A++;
					C--;
				}
			}

			if (S == "BC") {
				if (C == 0 && B == 0) {
					cout << "No" << endl;
					return 0;
				}
				if (C) {
					Q.push('B');
					C--;
					B++;
				}
				else {
					Q.push('C');
					C++;
					B--;
				}
			}
		}
		cout << "Yes" << endl;
		while (!Q.empty()) {
			cout << Q.front() << endl;
			Q.pop();
		}
		return 0;
	}

	if (A + B == 0 || B + C == 0 || C + A == 0) {
		if (A + B == 0) {
			C = 2;
			cin >> S;
			if (S == "AB") {
				cout << "No" << endl;
				return 0;
			}
			if (S == "BC") {
				Q.push('B');
				B++;
				C--;
			}
			if (S == "AC") {
				Q.push('A');
				A++;
				C--;
			}
		}
		else if (B + C == 0) {
			A = 2;
			cin >> S;
			if (S == "BC") {
				cout << "No" << endl;
				return 0;
			}
			if (S == "AC") {
				Q.push('C');
				A--;
				C++;
			}
			if (S == "AB") {
				Q.push('B');
				A--;
				B++;
			}
		}
		else {
			B = 2;
			cin >> S;
			if (S == "AC") {
				cout << "No" << endl;
				return 0;
			}
			if (S == "BC") {
				Q.push('C');
				B--;
				C++;
			}
			if (S == "AB") {
				Q.push('A');
				A++;
				B--;
			}
		}
		N--;
	}
	else {
		if (A == 0)B = 1, C = 1;
		else if (B == 0)C = 1, A = 1;
		else C = 0, A = 1, B = 1;
	}
	for (int i = 0;i < N;i++) {
		cin >> S;
		if (S == "AB") {
			if (A + B == 2) {
				if (i == N - 1) {
					Q.push('A');
					break;
				}
				i++;
				cin >> S;
				if (S == "BC") {
					Q.push('B');
					Q.push('C');
					A = 0, B = 1, C = 1;
				}
				else if (S == "AB") {
					Q.push('A');
					Q.push('B');
					A = 1, B = 1, C = 0;
				}
				else {
					Q.push('A');
					Q.push('C');
					A = 1, B = 0, C = 1;
				}
			}
			else {
				if (A == 1)Q.push('B');
				else Q.push('A');
				swap(A, B);
			}
		}

		else if (S == "BC") {
			if (B + C == 2) {
				if (i == N - 1) {
					Q.push('B');
					break;
				}
				i++;
				cin >> S;
				if (S == "AC") {
					Q.push('C');
					Q.push('A');
					B = 0, C = 1, A = 1;
				}
				else if (S == "BC") {
					Q.push('B');
					Q.push('C');
					B = 1, C = 1, A = 0;
				}
				else {
					Q.push('B');
					Q.push('A');
					B = 1, C = 0, A = 1;
				}
			}
			else {
				if (B == 1)Q.push('C');
				else Q.push('B');
				swap(B, C);
			}
		}
		
		else  {
			if (C + A == 2) {
				if (i == N - 1) {
					Q.push('C');
					break;
				}
				i++;
				cin >> S;
				if (S == "AB") {
					Q.push('A');
					Q.push('B');
					C = 0, A = 1, B = 1;
				}
				else if (S == "AC") {
					Q.push('C');
					Q.push('A');
					C = 1, A = 1, B = 0;
				}
				else {
					Q.push('C');
					Q.push('B');
					C = 1, A = 0, B = 1;
				}
			}
			else {
				if (C == 1)Q.push('A');
				else Q.push('C');
				swap(A, C);
			}
		}
	}
	cout << "Yes" << endl;
	while (!Q.empty()) {
		cout << Q.front() << endl;
		Q.pop();
	}
}

Measured memory_bytes: 3740