#include <iostream>
#include<vector>
using namespace std;
int n,a[3],x,y;
string s,t;
vector<int> v;
int main(void){
    cin>>n>>a[0]>>a[1]>>a[2];
    cin>>s;
    for(int i=0;i<n;i++){
        if(i!=n-1)cin>>t;
        else t=s;
        x=s[0]-'A';
        y=s[1]-'A';
        if(a[x]==0&&a[y]==0){cout<<"No"<<endl;return 0;}
        else if(a[x]==0){a[x]++;a[y]--;v.push_back(x);}
        else if(a[y]==0){a[y]++;a[x]--;v.push_back(y);}
        else if(a[x]>a[y]){a[x]--;a[y]++;v.push_back(y);}
        else if(a[x]<a[y]){a[y]--;a[x]++;v.push_back(x);}
        else{
            if((t[0]-'A')==x||(t[1]-'A')==x){a[x]++;a[y]--;v.push_back(x);}
            else {a[x]--;a[y]++;v.push_back(y);}
        }
        s=t;
    }
    cout<<"Yes"<<endl;
    for(auto x:v){
        cout<<char(x+'A')<<endl;
    }
}
