#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#define PI 3.14159265359
typedef long long ll;
const int MOD = 1e9+7;
const ll LLINF = 1e18;
using namespace std;


ll llmin(ll x, ll y){
	if (x < y) return x;
	return y;
}

ll llmax(ll x, ll y){
	if (x > y) return x;
	return y;
}


int main(){
	ll n, a, b, c;
	cin >> n >> a >> b >> c;
	vector<string> s(n);
	vector<char> ans;
	for (int i = 0; i < n; i++) cin >> s[i];
	ll sum = a + b + c;

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


Measured memory_bytes: 6732