#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define sz(a) a.size()
#define re return
#define all(a) a.begin(),a.end()
#define int long long
using namespace std;
int n, a[3];
string s[100005];
vector<char> ans;
signed main()
{
	cin>>n>>a[0]>>a[1]>>a[2];
	for (int i=0;i<n;i++){
		cin>>s[i];
	}
	for (int i=0;i<n;i++){
		if (!a[s[i][0]-'A'] && !a[s[i][1]-'A']){
			cout<<"No";
			re 0;
		}
		else if (a[s[i][0]-'A']>a[s[i][1]-'A']){
			ans.pb(s[i][1]);
			a[s[i][0]-'A']--;
			a[s[i][1]-'A']++;
		}
		else if (a[s[i][0]-'A']<a[s[i][1]-'A']){
			ans.pb(s[i][0]);
			a[s[i][0]-'A']++;
			a[s[i][1]-'A']--;
		}
		else if (a[s[i][0]-'A']==a[s[i][1]-'A']){
			if (i==n-1 || s[i+1][0]==s[i][0] || s[i+1][1]==s[i][0]){
				ans.pb(s[i][0]);
				a[s[i][0]-'A']++;
				a[s[i][1]-'A']--;
			}
			else{
				ans.pb(s[i][1]);
				a[s[i][0]-'A']--;
				a[s[i][1]-'A']++;
			}
		}
		//cout<<a[0]<<' '<<a[1]<<' '<<a[2]<<endl;
	}
	cout<<"Yes"<<endl;
	for (int i=0;i<n;i++)
		cout<<ans[i]<<endl;
	re 0;
}