#include <bits/stdc++.h>
using namespace std;
typedef long long lli;
typedef long double lld;
#define mod 1000000007
#define mod2 998244353
#define fori(n) for (int i = 0; i < n; i++)
#define forj(n) for (int j = 0; j < n; j++)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define endl "\n"
#define sortvec(a) sort(a.begin(), a.end())
#define watch(x) cerr << "\n" << (#x) << " is " << (x) << endl
#define cerr if(true)cerr
void print(){cout<<endl;}
template<typename T,typename... Args>
void print(T a, Args... args) {cout<<a<<" ";print(args...);}
lli llipowerp(lli x, lli y, lli p=LLONG_MAX)
{
    lli res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1) res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}
lli binarySearch(vector<int> arr, int l, int r, int x)
{
    if (r >= l)
    {
        lli mid = l + (r - l) / 2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid - 1, x);
        return binarySearch(arr, mid + 1, r, x);
    }
    return -1;
}
template <typename T>
inline void printvec(vector<T> inp){
    for(auto it:inp) cout<<it<<" ";
    cout << endl;
}
//---------------------------------------------------------------------------------
lld nthRoot(lli A, lli N)
{
    // intially guessing a random number between
    // 0 and 9
    lld xPre = rand() % 10;

    //  smaller eps, denotes more accuracy
    lld eps = 1e-3;

    // initializing difference between two
    // roots by INT_MAX
    lld delX = INT_MAX;

    //  xK denotes current value of x
    lld xK;

    //  loop untill we reach desired accuracy
    while (delX > eps)
    {
        //  calculating current value from previous
        // value by newton's method
        xK = ((N - 1.0) * xPre +
              (lld)A / pow(xPre, N - 1)) /
             (lld)N;
        delX = abs(xK - xPre);
        xPre = xK;
    }

    return xK;
}
int main(){
    
    int n;
    cin>>n;
    lli a,b,c;
    cin>>a>>b>>c;
    string ans="";
    vector<string> inps(n);
    fori(n) cin>>inps[i];
    string inp;
    fori(n){
        inp=inps[i];
        if(inp=="AB"){
            if(a==0 && b==0){
                cout<<"No"<<endl;
                return 0;
            }
            if(a==b & i!=n-1){
                if(inps[i+1]=="AC"){
                    a++;
                    b--;
                    ans+='A';
                }
                else{
                    a--;
                    b++;
                    ans+='B';
                }
            }
            else if(a>=b){
                a--;
                b++;
                ans+='B';

            }
            else{
                a++;
                b--;
                ans+='A';
            }
        }
        if(inp=="BC"){
            if (b == 0 && c == 0)
            {
                cout << "No" << endl;
                return 0;
            }
            if (b == c & i != n - 1)
            {
                if (inps[i + 1] == "AB")
                {
                    b++;
                    c--;
                    ans += 'B';
                }
                else
                {
                    b--;
                    c++;
                    ans += 'C';
                }
            }
            else if (b >= c)
            {
                b--;
                c++;
                ans += 'C';
            }
            else
            {
                b++;
                c--;
                ans += 'B';
            }
        }
        if(inp=="AC"){
            if (a == 0 && c == 0)
            {
                cout << "No" << endl;
                return 0;
            }
            if (a == c & i != n - 1)
            {
                if (inps[i + 1] == "AB")
                {
                    a++;
                    c--;
                    ans += 'A';
                }
                else
                {
                    a--;
                    c++;
                    ans += 'C';
                }
            }
            else if (a >= c)
            {
                a--;
                c++;
                ans += 'C';
            }
            else
            {
                a++;
                c--;
                ans += 'A';
            }
        }
    }  
    cout<<"Yes"<<endl;
    fori(ans.size()){
        cout<<ans[i]<<endl;
    } 


}


Measured memory_bytes: 6696