/*!enjoy karo yaar!*/

//CF,CC,AtC,SPOJ: hp1999
//HE: hemant269
//HR: hemant2132

#include<bits/stdc++.h>
using namespace std;

//#define     int             long long int
#define     fast()          ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define     all(x)          (x).begin(),(x).end()
#define     rz(x)           resize(x)
#define     mem(a,b)        memset(a,b,sizeof(a))
#define     sz(x)           ((int)(x.size()))
#define     eb              emplace_back
#define     pb              push_back
#define     pf              push_front
#define     pob             pop_back
#define     pof             pop_front
#define     ins             insert
#define     vi              vector<int>
#define     pii             pair<int,int>
#define     mii             map<int,int>
#define     F               first
#define     S               second
#define     makep           make_pair
#define     maket           make_tuple
#define     remax(a,b)      a=max(a,b)
#define     remin(a,b)      a=min(a,b)
#define     bitcount(x)     __builtin_popcountll(x)
#define     iceil(n,x)      (((n)+(x)-1)/(x))
#define     gcd(a,b)        (__gcd((a),(b)))
#define     lcm(a,b)        (((a)*(b))/gcd((a),(b)))
#define     dbug(x)         cout<<#x<<": "<<(x)<<"\n"
#define     flush           fflush(stdout)
#define     show(x)         for(auto zz:x)cout<<zz<<" ";cout<<"\n";
#define     show2(x)        for(auto zz:x)cout<<zz.F<<" "<<zz.S<<"\n";

typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;

const ld pi=acos(-1);
const ll inf=1e18,M=1e9+7;
const int N=1e5+5;

// note: in the last submission, I was accessing indices/states outside the specified limits
// but those got evaluated as "false" and the code ran successfully

// here I have tried to correct that and have used "str" to print the answer

bool dp[N][3][3][3];
bool mark[N][3][3][3];

vector<string> s;
int n;

string str="";

bool rec(int ind,int a,int b,int c)
{
    if(a<0 || b<0 || c<0)
        return 0;

    if(ind==n)
        return 1;

    a=min(a,2),b=min(b,2),c=min(c,2);

    if(mark[ind][a][b][c])
        return dp[ind][a][b][c];

    mark[ind][a][b][c]=1;

    bool res=0;

    if(s[ind]=="AB")
    {
        if(rec(ind+1,a+1,b-1,c))
            res=1,str+="A";
        else if(rec(ind+1,a-1,b+1,c))
            res=1,str+="B";
    }

    else if(s[ind]=="AC")
    {
        if(rec(ind+1,a+1,b,c-1))
            res=1,str+="A";
        else if(rec(ind+1,a-1,b,c+1))
            res=1,str+="C";
    }

    else if(s[ind]=="BC")
    {
        if(rec(ind+1,a,b+1,c-1))
            res=1,str+="B";
        else if(rec(ind+1,a,b-1,c+1))
            res=1,str+="C";
    }

    dp[ind][a][b][c]=res;

    return res;
}

void solve()
{
    mem(dp,0);
    mem(mark,0);

    int a,b,c;
    cin>>n>>a>>b>>c;

    s.rz(n);
    for(int i=0;i<n;++i)
        cin>>s[i];

    bool ans=rec(0,a,b,c);

    if(!ans)
    {
        cout<<"No";
        return;
    }

    cout<<"Yes\n";

    reverse(all(str));
    for(auto& c:str)
        cout<<c<<"\n";
}

int32_t main()
{
    fast();

    int t=1;
    //cin>>t;
    for(int z=1;z<=t;++z)
    {
        solve();
        //cout<<"\n";
    }

    return 0;
}



Measured memory_bytes: 21260