#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdlib>
#include <map>
#include <iomanip>
#include <set>
#include <stdio.h>
#include <ctype.h>
#include <random>
#include <string.h>
using namespace std;
#define pie 3.141592653589793238462643383279
#define mod 1000000007
#define int long long
#define P pair<int,int>
#define all(vec) vec.begin(),vec.end()

int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x%y);
}
int lcm(int x, int y) {
	return x / gcd(x, y)*y;
}
int kai(int x, int y) {
	int res = 1;
	for (int i = x - y + 1; i <= x; i++) {
		res *= i; res %= mod;
	}
	return res;
}
int mod_pow(int x, int y, int m) {
	int res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}

int comb(int x, int y) {
	if (y > x)return 0;
	return kai(x, y) * mod_pow(kai(y, y), mod - 2, mod) % mod;
}

int n, a, b, c;
string s[100010];
vector<char> ans;

signed main() {
	cin >> n >> a >> b >> c;
	for (int i = 0; i < n; i++)cin >> s[i];
	for (int i = 0; i < n - 1; i++) {
		if (s[i] == "AB") {
			if (a + b == 0) {
				cout << "No" << endl;
				return 0;
			}
			if (s[i + 1] == "BC") {
				if (a == 0) {
					a++;
					b--;
					ans.push_back('A');
				}
				else {
					a--;
					b++;
					ans.push_back('B');
				}
			}
			else if (s[i + 1] == "AC") {
				if (b == 0) {
					b++;
					a--;
					ans.push_back('B');
				}
				else {
					b--;
					a++;
					ans.push_back('A');
				}
			}
			else {
				if (a < b) {
					a++;
					b--;
					ans.push_back('A');
				}
				else {
					a--;
					b++;
					ans.push_back('B');
				}
			}
		}
		if (s[i] == "AC") {
			if (a + c == 0) {
				cout << "No" << endl;
				return 0;
			}
			if (s[i + 1] == "BC") {
				if (a == 0) {
					a++;
					c--;
					ans.push_back('A');
				}
				else {
					a--;
					c++;
					ans.push_back('C');
				}
			}
			else if (s[i + 1] == "AB") {
				if (c == 0) {
					c++;
					a--;
					ans.push_back('C');
				}
				else {
					c--;
					a++;
					ans.push_back('A');
				}
			}
			else {
				if (a < c) {
					a++;
					c--;
					ans.push_back('A');
				}
				else {
					a--;
					c++;
					ans.push_back('C');
				}
			}
		}
		if (s[i] == "BC") {
			if (b + c == 0) {
				cout << "No" << endl;
				return 0;
			}
			if (s[i + 1] == "AC") {
				if (b == 0) {
					b++;
					c--;
					ans.push_back('B');
				}
				else {
					b--;
					c++;
					ans.push_back('C');
				}
			}
			else if (s[i + 1] == "AB") {
				if (c == 0) {
					c++;
					b--;
					ans.push_back('C');
				}
				else {
					c--;
					b++;
					ans.push_back('B');
				}
			}
			else {
				if (b < c) {
					b++;
					c--;
					ans.push_back('B');
				}
				else {
					b--;
					c++;
					ans.push_back('C');
				}
			}
		}
	}
	if (s[n-1] == "AB") {
		if (a + b == 0) {
			cout << "No" << endl;
			return 0;
		}
		if (a < b) {
			a++;
			b--;
			ans.push_back('A');
		}
		else {
			a--;
			b++;
			ans.push_back('B');
		}
	}
	if (s[n-1] == "AC") {
		if (a + c == 0) {
			cout << "No" << endl;
			return 0;
		}
		if (a < c) {
			a++;
			c--;
			ans.push_back('A');
		}
		else {
			a--;
			c++;
			ans.push_back('C');
		}
	}
	if (s[n-1] == "BC") {
		if (b + c == 0) {
			cout << "No" << endl;
			return 0;
		}
		if (b < c) {
			b++;
			c--;
			ans.push_back('B');
		}
		else {
			b--;
			c++;
			ans.push_back('C');
		}
	}
	cout << "Yes" << endl;
	for (int i = 0; i < n; i++)cout << ans[i] << endl;
}

Measured memory_bytes: 6916