#include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <random>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define repp(i,n,m) for (int i = m; i < (n); ++i)
#define repl(i,n) for (long long i = 0; i < (n); ++i)
#define reppl(i,n,m) for (long long i = m; i < (n); ++i)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using PL = pair<long long, long long>;
using Pxy = pair<long double, long double>;
using T = tuple<int, int, bool>;
const int INF = 1001001007;
const int MOD = 1000000007;
const ll inf = 1e18;
template <typename AT>
void printvec(vector<AT> &ar){
    rep(i,ar.size()-1) cout << ar[i] << " ";
    cout << ar[ar.size()-1] << endl;
}
template <typename Q>
void printvvec(vector<vector<Q>> &ar){
    rep(i,ar.size()){
        rep(j,ar[0].size()-1) cout << ar[i][j] << " ";
        cout << ar[i][ar[0].size()-1] << endl;
    }
}
template <typename S>
bool range(S a, S b, S x){
    return (a <= x && x < b);
}

char solve(string ABC, int a, int b, int c, string next){
    if (ABC == "AB" && a == 0 && b == 0) return 'N';
    if (ABC == "BC" && b == 0 && c == 0) return 'N';
    if (ABC == "AC" && a == 0 && c == 0) return 'N';
    if (ABC == "AB" && a == 1 && b == 1 && c == 0){
        if (next == "AB") return 'A';
        if (next == "BC") return 'B';
        if (next == "AC") return 'A';
        return 'A';
    }
    if (ABC == "BC" && b == 1 && c == 1 && a == 0){
        if (next == "AB") return 'B';
        if (next == "BC") return 'B';
        if (next == "AC") return 'C';
        return 'B';
    }
    if (ABC == "AC" && a == 1 && c == 1 && b == 0){
        if (next == "AB") return 'A';
        if (next == "BC") return 'C';
        if (next == "AC") return 'C';
        return 'C';
    }
    if (ABC == "AB" && a < b) return 'A';
    if (ABC == "AB" && a >= b) return 'B';
    if (ABC == "BC" && b < c) return 'B';
    if (ABC == "BC" && b >= c) return 'C'; 
    if (ABC == "AC" && c < a) return 'C';
    if (ABC == "AC" && c >= a) return 'A';
}

void sousa(string ABC, char p, int &a, int &b, int &c){
    if (ABC == "AB"){
        if (p == 'A'){
            a++;
            b--;
        }
        else {
            a--;
            b++;
        }
    }
    if (ABC == "BC"){
        if (p == 'B'){
            b++;
            c--;
        }
        else {
            b--;
            c++;
        }
    }
    if (ABC == "AC"){
        if (p == 'A'){
            a++;
            c--;
        }
        else {
            a--;
            c++;
        }
    }
}

int main() {
    int n, a, b, c; cin >> n >> a >> b >> c;
    vector<string> ar(n);
    vector<char> an(n);
    rep(i,n) cin >> ar[i];
    ar.emplace_back("ABC");
    if (a == 0 && b == 0 && c == 0){
        cout << "No" << endl;
        return 0;
    }
    else {
        rep(i,n){
            char ans = solve(ar[i],a,b,c,ar[i+1]);
            if (ans == 'N'){
                cout << "No" << endl;
                return 0;
            }
            else {
                an[i] = ans;
                sousa(ar[i],ans,a,b,c);
            }
        }
    }
    cout << "Yes" << endl;
    rep(i,n) cout << an[i] << endl;
}

Measured memory_bytes: 9588