#include <algorithm>
#include <iostream>
#include <stack>
#include <queue>
#include <cmath>
#include <string>
#include <iterator>
#include <map>
#include <set>
#include <iomanip>
#include <vector>
#include <cstdint>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Graph = vector<vector<int>>;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
#define rep(i, N) for(int i = 0; i < N; i++)
#define rep2(i, l, r) for (ll i = (ll)l; i < (ll)(r); i++)
#define INF 1000000000000000
#define MAX 200001

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
const ll MOD = 1000000007;

template <typename T > inline string toString(const T &a) {ostringstream oss; oss << a; return oss.str();};

int main(){
    int N, A, B, C;
    cin >> N >> A >> B >> C;
    bool flag = true;
    vector<char> ans(N);
    vector<string> s_l(N);
    rep(i,N) cin >> s_l[i];
    rep(i,N){
        string s = s_l[i];
        if(s == "AB"){
            if(A == 0 && B == 0) flag = false;
            else if(A == 1 && B == 1 && C == 0 && i != N-1){
                if(s_l[i+1] == "AB"){
                    ans[i] = 'B';
                    A--;
                    B++;
                }
                else if(s_l[i+1] == "AC"){
                    ans[i] = 'A';
                    A++;
                    B--;
                }
                else{
                    ans[i] = 'B';
                    A--;
                    B++;
                }
            }
            else{
                if(A > B){
                    ans[i] = 'B';
                    A--;
                    B++;
                }
                else{
                    ans[i] = 'A';
                    A++;
                    B--;
                }
            }
        }
        else if(s == "AC"){
            if(A == 0 && C == 0) flag = false;
            else if(A == 1 && B == 0 && C == 1 && i != N-1){
                if(s_l[i+1] == "AB"){
                    ans[i] = 'A';
                    A++;
                    C--;
                }
                else if(s_l[i+1] == "AC"){
                    ans[i] = 'A';
                    A++;
                    C--;
                }
                else{
                    ans[i] = 'C';
                    A--;
                    C++;
                }
            }
            else{
                if(A > C){
                    ans[i] = 'C';
                    A--;
                    C++;
                }
                else{
                    ans[i] = 'A';
                    A++;
                    C--;
                }
            }
        }
        if(s == "BC"){
            if(B == 0 && C == 0) flag = false;
            else if(A == 0 && B == 1 && C == 1 && i != N-1){
                if(s_l[i+1] == "AB"){
                    ans[i] = 'B';
                    B++;
                    C--;
                }
                else if(s_l[i+1] == "AC"){
                    ans[i] = 'C';
                    B--;
                    C++;
                }
                else{
                    ans[i] = 'C';
                    B--;
                    C++;
                }
            }
            else{
                if(B > C){
                    ans[i] = 'C';
                    B--;
                    C++;
                }
                else{
                    ans[i] = 'B';
                    B++;
                    C--;
                }
            }
        }
    }
    if(flag){
        cout << "Yes" << endl;
        for(auto a:ans) cout << a << endl;
    }
    else cout << "No" << endl;
}

Measured memory_bytes: 6408