#include <iostream>
using namespace std;

#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>

int main() {

    long long int n, a, b, c;
    cin >> n >> a >> b >> c;
    long long int aa = a;
    long long int bb = b;
    long long int cc = c;

    vector< long long int > v;

    for ( long long int i = 0; i < n; i++ ) {
        string in;
        cin >> in;
        if ( in == "BC" ) v.push_back( 0 );
        if ( in == "AC" ) v.push_back( 1 );
        if ( in == "AB" ) v.push_back( 2 );
    }
    v.push_back( 4 );

    vector< long long int > ans;
    for ( long long int i = 0; i < n; i++ ) {
        if ( v[i] == 0 ) {
            if ( b == 0 && c == 0 ) {
                break;
            } else if ( b == 0 ) {
                b++;
                c--;
                ans.push_back( 1 );
            } else if ( c == 0 ) {
                b--;
                c++;
                ans.push_back( 2 );
            } else if ( b > c ) {
                b--;
                c++;
                ans.push_back( 2 );
            } else if ( b < c ) {
                b++;
                c--;
                ans.push_back( 1 );
            } else {
                if ( v[i+1] == 1 ) {
                    b--;
                    c++;
                    ans.push_back( 2 );
                } else {
                    b++;
                    c--;
                    ans.push_back( 1 );
                }
            }
        } else if ( v[i] == 1 ) {
            if ( a == 0 && c == 0 ) {
                break;
            } else if ( a == 0 ) {
                a++;
                c--;
                ans.push_back( 0 );
            } else if ( c == 0 ) {
                a--;
                c++;
                ans.push_back( 2 );
            } else if ( a > c ) {
                a--;
                c++;
                ans.push_back( 2 );
            } else if ( a < c ) {
                a++;
                c--;
                ans.push_back( 0 );
            } else {
                if ( v[i+1] == 0 ) {
                    a--;
                    c++;
                    ans.push_back( 2 );
                } else {
                    a++;
                    c--;
                    ans.push_back( 0 );
                }
            }
        } else if ( v[i] == 2 ) {
            if ( a == 0 && b == 0 ) {
                break;
            } else if ( a == 0 ) {
                a++;
                b--;
                ans.push_back( 0 );
            } else if ( b == 0 ) {
                a--;
                b++;
                ans.push_back( 1 );
            } else if ( a > b ) {
                a--;
                b++;
                ans.push_back( 1 );
            } else if ( a < b ) {
                a++;
                b--;
                ans.push_back( 0 );
            } else {
                if ( v[i+1] == 0 ) {
                    a--;
                    b++;
                    ans.push_back( 1 );
                } else {
                    a++;
                    b--;
                    ans.push_back( 0 );
                }
            }
        }
    }

    if ( ans.size() != n ) {
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
        for ( long long int i = 0; i < n; i++ ) {
            char p = 'A' + ans[i];
            cout << p << endl;
        }
    }

    return 0;

}


Measured memory_bytes: 5640