#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
 
using namespace __gnu_pbds;
using namespace std;
 
typedef long long int ll;
typedef unsigned long long int sll;
typedef  double ld;
#define A 1000000007ll
#define D 1000000000ll
#define B 998244353ll
#define C 1000000000000000000ll
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define oset tree<pair<ll,ll>, null_type,less<pair<ll,ll>>, rb_tree_tag,tree_order_statistics_node_update> 
#define pb push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define mxe(v) *max_element(v.begin(),v.end())
#define mne(v) *min_element(v.begin(),v.end())
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define ve vector
#define br break
#define PI acos(-1)
#define subt cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n"
 
int main() 
{
    FAST;
    ll n,a[3];
    cin>>n>>a[0]>>a[1]>>a[2];
    string s[n],ans;
    if(a[0]+a[1]+a[2]==2)
    {
        for(int i=0;i<n;i++)
            cin>>s[i];
        int i=0;
        for(i=0;i<n-1;i++)
        {
            ll x=s[i][0]-'A',y=s[i][1]-'A';
            if(a[x]==1 && a[y]==1)
            {
                if(s[i+1][0]==s[i][0] && s[i+1][1]==s[i][1])
                {
                    ans.pb(x+'A');
                    ans.pb(y+'A');
                    i++;
                    continue;
                }
                else
                {
                    if(s[i+1][0]==s[i][0] || s[i+1][1]==s[i][0])
                    {
                        a[y]=0;
                        ans.pb(x+'A');
                        if(s[i+1][0]!=s[i][0])
                        {
                            ans.pb(s[i+1][0]);
                            a[s[i+1][0]-'A']=1;
                        }
                        else
                        {
                            ans.pb(s[i+1][1]);
                            a[s[i+1][1]-'A']=1;
                        }
                        i++;
                        continue;
                    }
                    else
                    {
                        a[x]=0;
                        ans.pb(y+'A');
                        if(s[i+1][0]!=s[i][1])
                        {
                            ans.pb(s[i+1][0]);
                            a[s[i+1][0]-'A']=1;
                        }
                        else
                        {
                            ans.pb(s[i+1][1]);
                            a[s[i+1][1]-'A']=1;
                        }
                        i++;
                        continue;
                    }
                }
            }
            else
            {
                if(a[x]>a[y])
                {
                    a[x]--;
                    a[y]++;
                    ans.pb(y+'A');
                }
                else
                {
                    a[y]--;
                    a[x]++;
                    ans.pb(x+'A');
                }
                if(a[0]<0 || a[1]<0 || a[2]<0)
                {
                    cout<<"No";
                    return 0;
                }
            }
        }
        if(ans.size()!=n)
        {
            ll x=s[n-1][0]-'A',y=s[n-1][1]-'A';
            if(a[x]>a[y])
            {
                a[x]--;
                a[y]++;
                ans.pb(y+'A');
            }
            else
            {
                a[y]--;
                a[x]++;
                ans.pb(x+'A');
            }
            if(a[0]<0 || a[1]<0 || a[2]<0)
            {
                cout<<"No";
                return 0;
            }
        }
    }
    else
    {
        for(int i=0;i<n;i++)
        {
            cin>>s[i];
            ll x=s[i][0]-'A',y=s[i][1]-'A';
            if(a[x]>a[y])
            {
                a[x]--;
                a[y]++;
                ans.pb(y+'A');
            }
            else
            {
                a[y]--;
                a[x]++;
                ans.pb(x+'A');
            }
            if(a[0]<0 || a[1]<0 || a[2]<0)
            {
                cout<<"No";
                return 0;
            }
        }
    }
    cout<<"Yes\n";
    for(int i=0;i<n;i++)
        cout<<ans[i]<<'\n';
    subt;
    return 0;
}

Measured memory_bytes: 7100