/*
  AUTHOR:SOURABH
  CREATED:01:05:20
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ordered_set tree<pll , null_type, less< pll >, rb_tree_tag, tree_order_statistics_node_update>
#define ll long long int
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pob pop_back
#define W while
#define fn(i,x) for(i=0;i<x;i++)
#define fs(i,s,x) for(i=s;i<x;i++)
#define fr(i,x) for(i=x;i>=0;i--)
#define fit(it,s) for(it=s.begin();it!=s.end();it++)
#define mp make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vii vector<int>
#define vll vector<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define mod 1000000007
#define MAX 100005
#define M 32

using namespace std;
using namespace __gnu_pbds;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);

    ll t,n,a,b,c,i,j;
    t=1;
    //cin>>t;
    W(t--)
    {
        cin>>n>>a>>b>>c;
        string s[n];
        vector<char> ans;
        fn(i,n)
        cin>>s[i];
        fn(i,n)
        {
            if(s[i]=="AB")
            {
                if(a==1 && b==1 && c==0)
                {
                    if(i+1<n && s[i+1]=="AC")
                    {
                        a++,b--;
                        ans.pb('A');
                        continue;
                    }
                    else if(i+1<n && s[i+1]=="BC")
                    {
                        b++,a--;
                        ans.pb('B');
                        continue;
                    }
                }
                if(a<=b)
                {
                    a++,b--;
                    ans.pb('A');
                }
                else
                {
                    b++,a--;
                    ans.pb('B');
                }
            }
            else if(s[i]=="AC")
            {
                if(a==1 && c==1 && b==0)
                {
                    if(i+1<n && s[i+1]=="AB")
                    {
                        a++,c--;
                        ans.pb('A');
                        continue;
                    }
                    else if(i+1<n && s[i+1]=="BC")
                    {
                        c++,a--;
                        ans.pb('C');
                        continue;
                    }
                }
                if(a<=c)
                {
                    a++,c--;
                    ans.pb('A');
                }
                else
                {
                    c++,a--;
                    ans.pb('C');
                }
            }
            else
            {
                if(c==1 && b==1 && a==0)
                {
                    if(i+1<n && s[i+1]=="AC")
                    {
                        c++,b--;
                        ans.pb('C');
                        continue;
                    }
                    else if(i<n && s[i+1]=="AB")
                    {
                        b++,c--;
                        ans.pb('B');
                        continue;
                    }
                }
                if(c<=b)
                {
                    c++,b--;
                    ans.pb('C');
                }
                else
                {
                    b++,c--;
                    ans.pb('B');
                }
            }
            if(a<0 || b<0 || c<0)
            {cout<<"No";return 0;}
        }
        cout<<"Yes\n";
        fn(i,n)
        cout<<ans[i]<<"\n";
    }
    return 0;
}























Measured memory_bytes: 6864