#include<bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define rep(i,n) for(ll i=0;i<n;i++)
#define repp(i,a,b) for(ll i=a;i<=b;i++)
#define reff(i,a,b) for(ll i=a;i>=b;i--)
#define ll long long int
#define pll pair<ll,ll>
#define fill(a,x) memset(a,x,sizeof(a))
#define mb make_pair
#define pb push_back
#define F first
#define S second
#define M 1000000007
#define sc(x) scanf("%d",&x)
#define scc(x1,x2) scanf("%d%d",&x1,&x2)
#define sccc(x1,x2,x3) scanf("%d%d%d",&x1,&x2,&x3)
#define pr(x) printf("%lld ",x)
#define dbg(a)          std::cerr<<#a<<"="<<(a)<<"\n"
#define dbg1(a,b)       std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define dbg2(a,b,c)     std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define dbg3(a,b,c,d)   std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define all(v) v.begin(),v.end()
#define PI 3.14159265
#define co cout<<"fuck"<<endl
const int INF = 2034567891;
const ll INF64 = 4234567890123456789ll;
long long nc3(long long v){return (v * (v - 1ll) * (v - 2ll)) / 6ll;}
long long nc2(long long v){return (v * (v - 1ll)) / 2ll;}
ll gcd(ll a, ll b) { return (b == 0 ? a : gcd(b, a % b)); }
ll lcm(ll a, ll b) { return (a * (b / gcd(a, b))); }
const int N = 10+2e5;
bool isprime(ll n) {
    if (n < 2) return 0;
    if (n == 2) return 1;
    if (n % 2 == 0) return 0;
    for (ll i = 3; i*i <= n; i++) if (n%i == 0) return 0;
    return 1;
}
double dist(pll p1, pll p2)
 {
    return (p1. F - p2.F)*(p1.F - p2.F) +
          (p1.S - p2.S)*(p1.S - p2.S);
 }
ll power(ll x,ll y)
{
    ll ans=1;
    while(y>0){
        if(y&1)
            ans=(ans*x)%M;
        x=(x*x)%M;
        y/=2;
    } 
    return ans;
}

int main()
{
     fast;
     ll n,a,b,c;
     cin>>n>>a>>b>>c;
     vector<char>v;
     string s[n];
     rep(i,n) cin>>s[i];
     rep(i,n)
     {
         if(s[i]=="AB")
         {
             if(a==0 && b==0)
             {
                cout<<"No";
                return 0;
			 }
			 if(a>b)
			 {
			     a--;
			     b++;
			     v.pb('B');
			 }
			 else if(b>a)
			 {
			     a++;
			     b--;
			     v.pb('A');
			 }
			 else
			 {
			     if(i==n-1 || (s[i+1][0]!='A' && s[i+1][1]!='A'))
			     {
			          a--;
			          b++;
			          v.pb('B');
				 }
				 else
				 {
				     a++;
				     b--;
				     v.pb('A');
				 }
			 }
		 }
		 else if(s[i]=="AC")
		 {
		     if(a==0 && c==0)
             {
                cout<<"No";
                return 0;
			 }
			 if(a>c)
			 {
			     a--;
			     c++;
			     v.pb('C');
			 }
			 else if(c>a)
			 {
			    c--;
			    a++;
			    v.pb('A');
			 }
			 else
			 {
			     if(i==n-1 || (s[i+1][0]!='A' && s[i+1][1]!='A'))
			     {
			          a--;
			          c++;
			          v.pb('C');
				 }
				 else
				 {
				     a++;
				     c--;
				     v.pb('A');
				 }
			 }
		 }
		 else
		 {
		    if(c==0 && b==0)
             {
                cout<<"No";
                return 0;
			 }
			 if(b>c)
			 {
			     b--;
			     c++;
			     v.pb('C');
			 }
			 else if(b<c)
			 {
			      c--;
			      b++;
			      v.pb('B');
			 }
			 else
			 {
			      if(i==n-1 || (s[i+1][0]!='B' && s[i+1][1]!='B'))
			      {
			          c++;
			          b--;
			          v.pb('C');
				  }
				  else
				  {
				     c--;
				     b++;
				     v.pb('B');
				  }
			 }
		 }
	 }
	 cout<<"Yes"<<endl;
	 for(auto i : v)
	 {
	   //dbg(i);
	   cout<<i<<endl;
	}
}   

Measured memory_bytes: 6876