#include <bits/stdc++.h>

//#pragma GCC optimize("Ofast")

#define fi first
#define se second
#define ll long long
#define dl double long

using namespace std;

const int NN = 1e9 + 7;
const int N = 2e6 + 7;
const int M = 26;
const ll mod = 1e9 + 7;
const ll inf = 1e18 + 7;
const dl rf = 1e-14;
const int B = sqrt(N);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

void solve1()
{
    int n,a,b,c;
    cin >> n >> a >> b >> c;
    vector < string > v(n);
    for( int i = 0; i < n; i++ ){
        cin >> v[i];
    }
    vector < char > ans;
    for( int i = 0; i < n; i++ ){
        bool f = false;
        if( v[i] == "AB" ){
            if( a == 0 && b == 0 ){
                cout << "No\n";
                return;
            }
            if( a > b ){
                a -= 1 , b += 1 , f = true;
            }else if( a < b ){
                a += 1 , b -= 1;
            }else{
                if( a == 1 && b == 1 ){
                    if( i + 1 == n ){
                        a -= 1 , b += 1 , f = true;
                    }else{
                        if( v[i + 1][0] == 'A' ){
                            a += 1 , b -= 1;
                        }else{
                            a -= 1 , b += 1 , f = true;
                        }
                    }
                }else a -= 1 , b += 1 , f = true;;
            }
        }else if( v[i] == "AC" ){
                if( a == 0 && c == 0 ){
                    cout << "No\n";
                    return;
                }
                if( a > c ){
                    a -= 1 , c += 1 , f = true;
                }else if( a < c ){
                    a += 1 , c -= 1;
                }else{
                    if( a == 1 && c == 1 ){
                        if( i + 1 == n ){
                            a -= 1 , c += 1 , f = true;
                        }else{
                            if( v[i + 1][0] == 'A' ){
                                a += 1 , c -= 1;
                            }else{
                                a -= 1 , c += 1 , f = true;
                            }
                        }
                    }else a -= 1 , c += 1 , f = true;;
                }
        }else{
            if( c == 0 && b == 0 ){
                cout << "No\n";
                return;
            }
            if( c > b ){
                c -= 1 , b += 1;
            }else if( c < b ){
                c += 1 , b -= 1 , f = true;
            }else{
                if( c == 1 && b == 1 ){
                    if( i + 1 == n ){
                        c -= 1 , b += 1;
                    }else{
                        if( v[i + 1][1] == 'C' ){
                            c += 1 , b -= 1 , f = true;
                        }else{
                            c -= 1 , b += 1;
                        }
                    }
                }else c -= 1 , b += 1;
            }
        }
        if( f )ans.push_back(v[i][1]);
        else ans.push_back(v[i][0]);
    }
    cout << "Yes\n";
    for( auto x : ans )cout << x << "\n";
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


Measured memory_bytes: 6692