#include<bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define ll          long long
#define pb          push_back
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define rs(v,n)     v.resize(n)
#define hell        1000000007
#define peak        9123372036854775807
#define pii         acos(-1)
#define clr(a,x)    memset(a,x,sizeof(a))
#define ios         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
template<class x,class y> x sum(x a,y b){return a+b;}
template<class x,class y> x mul(x a,y b){return a*b;}
template<class x,class y> x sub(x a,y b){return a-b;}
template<class x,class y> x divi(x a,y b){return a/b;}

template<class x,class y>
istream &operator>>(istream &in,pair<x,y> &p) 
{ 
    in>>p.F>>p.S;
    return in;
}
template<class x>
istream &operator>>(istream &in,vector<x> &v) 
{
    for(auto& i:v)
        in>>i;
    return in;
}
template<class x,class y>
ostream &operator<<(ostream &out,pair<x,y> &p) 
{ 
    out<<"("<<p.F<<","<<p.S<<") ";
    return out; 
}
template<class x>
ostream &operator<<(ostream &out,vector<x> &v) 
{ 
    out<<v.size()<<endl;
    for(auto i:v)
        out<<i<<" ";
    out<<endl;
    return out; 
}
#define N  1000005

int main()
{
    ios;
    ll tt=1;
    // cin>>tt;
    while(tt--)
    {
    	ll i,j,k,l,m,n;
    	ll a,b,c;
    	cin>>n>>a>>b>>c;
    	vector<char> ans;
    	vector<string> vs;
    	for(i=0;i<n;i++)
    	{
    		string s;
    		cin>>s;
    		vs.pb(s);
    	}
    	for(i=0;i<n;i++)
    	{
    		string s;
    		s=vs[i];
    		if(s=="AB")
    		{
    			if(a==1&&b==1&&c==0&&i!=n-1)
    			{
    				if(vs[i+1]=="AC")
    				{
    					ans.pb('A');
    					a++;b--;
    				}
    				else
    				{
    					ans.pb('B');
    					b++;a--;
    				}
    				continue;
    			}
    			if(a>b)
    			{
    				ans.pb('B');
    				a--;b++;
    			}
    			else
    			{
    				ans.pb('A');
    				a++,b--;
    			}
    			if(a<0||b<0)
    			{
    				cout<<"No";return 0;
    			}
    		}
    		if(s=="AC")
    		{
    			if(a==1&&c==1&&b==0&&i!=n-1)
    			{
    				if(vs[i+1]=="AB")
    				{
    					ans.pb('A');
    					a++;c--;
    				}
    				else
    				{
    					ans.pb('C');
    					c++;a--;
    				}
    				continue;
    			}
    			if(a>c)
    			{
    				ans.pb('C');
    				a--;c++;
    			}
    			else
    			{
    				ans.pb('A');
    				a++,c--;
    			}
    			if(a<0||c<0)
    			{
    				cout<<"No";return 0;
    			}
    		}
    		if(s=="BC")
    		{
    			if(c==1&&b==1&&a==0&&i!=n-1)
    			{
    				if(vs[i+1]=="AC")
    				{
    					ans.pb('C');
    					c++;b--;
    				}
    				else
    				{
    					ans.pb('B');
    					b++;c--;
    				}
    				continue;
    			}
    			if(c>b)
    			{
    				ans.pb('B');
    				c--;b++;
    			}
    			else
    			{
    				ans.pb('C');
    				c++,b--;
    			}
    			if(c<0||b<0)
    			{
    				cout<<"No";return 0;
    			}
    		}
    	}
    	cout<<"Yes\n";
    	for(i=0;i<n;i++)cout<<ans[i]<<endl;
    }
    return 0;
}

Measured memory_bytes: 7376