#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(k,i,n) for(ll i=k;i<n;++i)
int main(void){
    ll n;
    cin>>n;
    vector<ll> var(256);
    for(char c='A';c<='C';++c)cin>>var[c];
    vector<string> s(n);
    rep(0,i,n)cin>>s[i];
    vector<char>ans(n);
    rep(0,i,n){
        char c1=s[i][0],c2=s[i][1],cM=(var[c1]>=var[c2]?c1:c2),cm=c1^c2^cM;
        if(var[c1]==var[c2]&&i+1<n&&(s[i+1][0]==c1||s[i+1][1]==c1))swap(cM,cm);
        if(var[cM]==0){
            cout<<"No";
            return 0;
        }
        var[cM]--,var[cm]++;
        ans[i]=cm;
    }
    cout<<"Yes"<<endl;
    rep(0,i,n)cout<<ans[i]<<endl;
}
