//by rko27
// how can i win if i am afraid to lose
/////////////////////////////
/////////////////////////////
/// *** JAI SHREE RAM *** ///
/// *** JAI HANUMAN *** ///
/////////////////////////////
/////////////////////////////
//---------------------------------------------------------------------------------------------------------------------------------------------------

#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int  long long
#define double long double 
#define ll  long long 
#define pb push_back
#define mp make_pair
#define fe first
#define se second
#define nl "\n"
#define ub upper_bound
#define lb lower_bound
#define sz(x) (int)(x.size())
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define god ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

//----------------------------------------------------------------------------------------------------------------------------------------------------

const double pi = 3.14159265358979323;
int mod=1000000000+7;
int modu=998244353;
const double pii=acos(-1.0);
const int INF=1e18;
const int inf=1e9;

//----------------------------------------------------------------------------------------------------------------------------------------------------

ll power(ll x,ll y){ll res=1;x=x;while(y>0){if(y&1)res=(res*x);y=y>>1;x=(x*x);}return res;}
ll powe(ll x, ll y){ x = x%mod, y=y%(mod-1);ll ans = 1;while(y>0){if (y&1){ans = (1ll * x * ans)%mod;}y>>=1;x = (1ll * x * x)%mod;}return ans;}
ll gcd(ll a,ll b){if (a==0)return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return (a/gcd(a,b)*b);}
bool isPrime(int n){for(int i=2;i*i<=n;i++)if(n%i==0) return false;return true;}
ll ncr(ll n,ll r){ll res=1;if(r>n)return 0;if(r>n-r)r=n-r;for(ll i=0;i<r;i++){res*=(n-i);res/=(i+1);}return res;}

//-------------------------------------------------------------------------------------------------------------------------------------------------------

void fun()
{
	
	//786
}

//-------------------------------------------------------------------------------------------------------------------------------------------------------

const int N=1e5+7;
int dx[8] = {1, 0,-1, 0, 1, -1, 1, -1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

//--------------------------------------------------------------------------------------------------------------------------------------------------------



//--------------------------------------------------------------------------------------------------------------------------------------------------------
signed main() 
{
	god;
	//rko;
	fun();
	int tttt=1; //cin>>tttt;
	while(tttt--)
	{
		int n,a,b,c; cin>>n>>a>>b>>c;
		std::vector<char> v(n);
		std::vector<string> vv(n+1);
		vv[n]="";
		string s; 
		for(int i=0;i<n;i++)
		{
			cin>>s;
			vv[i]=s;
		}
		int f=0;
		for(int i=0;i<n;i++)
		{
			s=vv[i];
			if(s=="AB")
			{
				if(a==0 and b==0) {
					f=1;
					break;
				}
				if(a==1 and b==1)
				{
					if(vv[i+1]=="AC")
					{
						a++, b--, v[i]='A';
					}
					else 
					{
						b++, a--, v[i]='B';
					}
				}
				else
				{
					if(a<b) {
						a++, b--, v[i]='A';
					}
					else {
						b++, a--, v[i]='B';
					}
				}
			}
			else if(s=="BC")
			{
				if(!b and !c) {
					f=1;
					break;
				}
				if(c==1 and b==1)
				{
					if(vv[i+1]=="AC")
					{
						c++, b--, v[i]='C';
					}
					else 
					{
						b++, c--, v[i]='B';
					}
				}
				else
				{
					if(b<c) {
						b++, c--, v[i]='B';
					}
					else {
						c++, b--, v[i]='C';
					}
				}
			}
			else if(s=="AC")
			{
				if(!a and !c) {
					f=1;
					break;
				}
				if(a==1 and c==1)
				{
					if(vv[i+1]=="AB")
					{
						a++, c--, v[i]='A';
					}
					else 
					{
						c++, a--, v[i]='C';
					}
				}
				else
				{
					if(a<c) {
						a++, c--, v[i]='A';
					}
					else {
						c++, a--, v[i]='C';
					}
				}
			}
		}
		if(f) cout<<"No\n";
		else {
			cout<<"Yes\n";
			for(auto i: v) cout<<i<<nl;
		}
	}
	return 0;
}

Measured memory_bytes: 6376