#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define ull unsigned long long int
#define forn(i,n)for(ll i=0;i<(n);i++)
#define forn_rev(i,n)for(ll i=(n)-1;i>=0;i--)
#define for1n(i,n) for(ll i=1;i<=(n);i++)
#define ARRAY_SIZE(a) sizeof(a)/sizeof(*a)
#define MOD 1000000007
#define MAXN 1000005

using namespace std;






int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL); cout.tie(NULL);
    ll T=1;
    //cin>>T;
    while(T--)
    {
        vector<char> ans;
        ll n,a,b,c;
        cin>>n>>a>>b>>c;
        bool exist=true;
        vector<string> s(n+1);
        for1n(i,n) cin>>s[i];
        for1n(i,n)
        {

            if(s[i]=="AB")
            {
                if(a<1 && b<1) exist=false;
                if(a==1 && b==1 &&c==0 && i<n&&s[i+1]=="AC"){
                    a++;
                    b--;
                    ans.push_back('A');
                    continue;
                }
                if(a==1 && b==1 &&c==0 && i<n&&s[i+1]=="BC"){
                    a--;
                    b++;
                    ans.push_back('B');
                    continue;
                }
                if(a<b){
                    a++;
                    ans.push_back('A');
                    b--;
                }
                else
                {
                    b++;
                    ans.push_back('B');
                    a--;
                }
            }
            else if(s[i]=="AC")
            {
                if(a<1 && c<1) exist=false;
                if(a==1 && c==1 && b==0 && i<n&&s[i+1]=="AB"){
                    a++;
                    c--;
                    ans.push_back('A');
                    continue;
                }
                if(a==1 && c==1 &&b==0 && i<n&&s[i+1]=="BC"){
                    a--;
                    c++;
                    ans.push_back('C');
                    continue;
                }
                if(a<c){
                    a++;
                    ans.push_back('A');
                    c--;
                }
                else
                {
                    c++;
                    ans.push_back('C');
                    a--;
                }

            }
            else
            {
                if(c<1 && b<1) exist=false;
                if(c==1 && b==1 &&a==0 && i<n&&s[i+1]=="AB"){
                    b++;
                    c--;
                    ans.push_back('B');
                    continue;
                }
                if(c==1 && b==1 &&a==0 && i<n&&s[i+1]=="AC"){
                    b--;
                    c++;
                    ans.push_back('C');
                    continue;
                }
                if(b<c){
                    b++;
                    ans.push_back('B');
                    c--;
                }
                else
                {
                    c++;
                    ans.push_back('C');
                    b--;
                }
            }
        }
        if(exist){
            cout<<"Yes"<<endl;
            forn(i,ans.size()) cout<<ans[i]<<endl;
        }
        else{
            cout<<"No"<<endl;
        }






    }



    return 0;
}



/*


struct data{

    ll count,index;

};

vector<ll> arr(10000);
vector<data> tmax(4*MAXN);



auto combine(data a,data b){
    //ultra based combine function for easier understanding
    data res=0;
    if(a>0) res.count++;
    if(b>0) res.count++
    return res;
}



void build(ll v,ll tl,ll tr)
{
    if(tl==tr)
    {

        tmax[v]=arr[tl];
        //leaf nodes
    }
    else
    {
        //store in array. Thus childs are 2*v and 2*v+1
        ll tm=(tl+tr)/2;//mid point
        build(2*v,tl,tm);//recurse to left sub tree
        build(2*v+1,tm+1,tr);//recurse to right tree
        tmax[v]=combine(tmax[2*v],tmax[2*v+1]);
    }
}

auto getmax(ll v,ll tl,ll tr,ll l,ll r)
{
    if(r<tl || l>tr)
        return -1;//check if outside range
    if(l<=tl && tr<=r)
        return tmax[v];//in range then return that value

    ll tm=(tl+tr)/2;
    //recurse to left and right subtree
    ll left=getmax(2*v,tl,tm,l,r),right=getmax(2*v+1,tm+1,tr,l,r);
    return combine(left,right);
}

ll update(ll v,ll tl,ll tr,ll l,ll tr,ll val){
    if(l>r) return;
    if(l==tl && tr==r){
        if(tmax[v]>=0)
            tmax[v]+=val;//update tree leaves here
        else return -1;

    }
    else{
        ll tm=(tl+tr)/2;
        if(tl>=m)
        ll right=update(2*v+1,tm+1,tr,val);//recurse to right subtree
        if(right==-1) return -1;
        update(2*v,tl,tm,val);//recurse to left subtree

        tmax[v]=combine(tmax[2*v],tmax[2*v+1]);//combine

    }

}
void pointupdate(ll v,ll tl,ll tr,ll pos,ll val){

    if(tl==tr){
        tmax[v]=make_data(val);//update tree leaves here

    }
    else{
        ll tm=(tl+tr)/2;
        if(pos<=tm) update(2*v,tl,tm,val);//recurse to left subtree
        else update(2*v+1,tm+1,tr,val);//recurse to right subtree

        tmax[v]=combine(tmax[2*v],tmax[2*v+1]);//combine

    }

}


*/





/*


struct data{

    ll count,index;

};

vector<ll> arr(10000);
vector<data> tmax(4*MAXN);



auto combine(data a,data b){
    //ultra based combine function for easier understanding
    data res=0;
    if(a>0) res.count++;
    if(b>0) res.count++
    return res;
}



void build(ll v,ll tl,ll tr)
{
    if(tl==tr)
    {

        tmax[v]=arr[tl];
        //leaf nodes
    }
    else
    {
        //store in array. Thus childs are 2*v and 2*v+1
        ll tm=(tl+tr)/2;//mid point
        build(2*v,tl,tm);//recurse to left sub tree
        build(2*v+1,tm+1,tr);//recurse to right tree
        tmax[v]=combine(tmax[2*v],tmax[2*v+1]);
    }
}

auto getmax(ll v,ll tl,ll tr,ll l,ll r)
{
    if(r<tl || l>tr)
        return -1;//check if outside range
    if(l<=tl && tr<=r)
        return tmax[v];//in range then return that value

    ll tm=(tl+tr)/2;
    //recurse to left and right subtree
    ll left=getmax(2*v,tl,tm,l,r),right=getmax(2*v+1,tm+1,tr,l,r);
    return combine(left,right);
}

ll update(ll v,ll tl,ll tr,ll l,ll tr,ll val){
    if(l>r) return;
    if(l==tl && tr==r){
        if(tmax[v]>=0)
            tmax[v]+=val;//update tree leaves here
        else return -1;

    }
    else{
        ll tm=(tl+tr)/2;
        if(tl>=m)
        ll right=update(2*v+1,tm+1,tr,val);//recurse to right subtree
        if(right==-1) return -1;
        update(2*v,tl,tm,val);//recurse to left subtree

        tmax[v]=combine(tmax[2*v],tmax[2*v+1]);//combine

    }

}
void pointupdate(ll v,ll tl,ll tr,ll pos,ll val){

    if(tl==tr){
        tmax[v]=make_data(val);//update tree leaves here

    }
    else{
        ll tm=(tl+tr)/2;
        if(pos<=tm) update(2*v,tl,tm,val);//recurse to left subtree
        else update(2*v+1,tm+1,tr,val);//recurse to right subtree

        tmax[v]=combine(tmax[2*v],tmax[2*v+1]);//combine

    }

}


*/





Measured memory_bytes: 6556