// header {{{
#include <bits/stdc++.h>
using namespace std;

// {U}{INT,LONG,LLONG}_{MAX,MIN}
#define INF         INT_MAX/3
#define LLINF       LLONG_MAX/3
#define MOD         (1000000007LL)
#define MODA(a, b)  a=((a)+(b))%MOD
#define MODP(a, b)  a=((a)*(b))%MOD
#define inc(i, l, r)   for(int i=(l);i<(r);i++)
#define dec(i, l, r)   for(int i=(r)-1;i>=(l);i--)
#define pb          push_back
#define se          second
#define fi          first
#define mset(a, b)  memset(a, b, sizeof(a))

using LL  = long long;
using G   = vector<vector<int>>;

int di[] = {0, -1, 0, 1};
int dj[] = {1, 0, -1, 0};
// }}}

int main() {
    cin.tie(0);ios::sync_with_stdio(false);
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    int sum = a + b + c;
    vector<char> ans;
    vector<string> ss(n);
    inc(i, 0, n) {
        cin >> ss[i];
        if(ss[i] == "AC"){
            ss[i] = "CA";
        }
    }
    inc(i, 0, n){
        auto s = ss[i];
        if(s == "AB"){
            if(a > b){
                a--;
                b++;
                if(a < 0){
                    cout << "No" << endl;
                    return 0;
                }
                ans.push_back('B');
            }else{
                if(sum == 2 && a == 1 && b == 1 && i < n-1){
                    if(ss[i+1] == "BC"){
                        a--;
                        b++;
                        ans.push_back('B');
                        continue;
                    }
                }
                a++;
                b--;
                if(b < 0){
                    cout << "No" << endl;
                    return 0;
                }
                ans.push_back('A');
            }
        }
        if(s == "BC"){
            if(b > c){
                b--;
                c++;
                if(b < 0){
                    cout << "No" << endl;
                    return 0;
                }
                ans.push_back('C');
            }else{
                if(sum == 2 && b == 1 && c == 1 && i < n-1){
                    if(ss[i+1] == "CA"){
                        b--;
                        c++;
                        ans.push_back('C');
                        continue;
                    }
                }
                b++;
                c--;
                if(c < 0){
                    cout << "No" << endl;
                    return 0;
                }
                ans.push_back('B');
            }
        }
        if(s == "CA"){
            if(c > a){
                c--;
                a++;
                if(c < 0){
                    cout << "No" << endl;
                    return 0;
                }
                ans.push_back('A');
            }else{
                if(sum == 2 && c == 1 && a == 1 && i < n-1){
                    if(ss[i+1] == "AB"){
                        c--;
                        a++;
                        ans.push_back('A');
                        continue;
                    }
                }
                c++;
                a--;
                if(a < 0){
                    cout << "No" << endl;
                    return 0;
                }
                ans.push_back('C');
            }
        }
    }
    cout << "Yes" << endl;
    inc(i, 0, n){
        cout << ans[i] << endl;
    }
    return 0;
}


Measured memory_bytes: 6632