#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ull = unsigned long long; 
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007LL;
//constexpr long long MOD = 998244353LL;
template<class T, class U> inline bool chmax(T &a, U b) { if (a < b) { a = b; return true;} return false; }
template<class T, class U> inline bool chmin(T &a, U b) { if (a > b) { a = b; return true;} return false; }
void print() { cout << "\n"; }
template <class T, class... Args>
void print(const T &x, const Args &... args) {
    cout << x << " ";
    print(args...);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    int N,A,B,C; cin >> N >> A >> B >> C;
    vector<string> S(N);
    rep(i,N) cin >> S[i];

    vector<char> ans(N);
    rep(i,N) {
        if (S[i]=="AB") {
            if (A==0 and B==0) {
                print("No");
                return 0;
            }
            if (A==1 and B==1 and C==0 and i < N-1) {
                if (S[i+1]=="BC") {
                    ans[i] = 'B';
                    A--;
                    B++;
                } else {
                    ans[i] = 'A';
                    A++;
                    B--;
                }
            } else {
                if (A < B) {
                    ans[i] = 'A';
                    A++;
                    B--;
                } else {
                    ans[i] = 'B';
                    A--;
                    B++;
                }
            }
        }
        if (S[i]=="AC") {
            if (A==0 and C==0) {
                print("No");
                return 0;
            }
            if (A==1 and C==1 and B==0 and i < N-1) {
                if (S[i+1]=="BC") {
                    ans[i] = 'C';
                    A--;
                    C++;
                } else {
                    ans[i] = 'A';
                    A++;
                    C--;
                }
            } else {
                if (A < C) {
                    ans[i] = 'A';
                    A++;
                    C--;
                } else {
                    ans[i] = 'C';
                    A--;
                    C++;
                }
            }
        }
        if (S[i]=="BC") {
            if (B==0 and C==0) {
                print("No");
                return 0;
            }
            if (B==1 and C==1 and A==0 and i < N-1) {
                if (S[i+1]=="AC") {
                    ans[i] = 'C';
                    B--;
                    C++;
                } else {
                    ans[i] = 'B';
                    B++;
                    C--;
                }
            } else {
                if (B < C) {
                    ans[i] = 'B';
                    B++;
                    C--;
                } else {
                    ans[i] = 'C';
                    B--;
                    C++;
                }
            }
        }
    }

    print("Yes");
    rep(i,N) print(ans[i]);
}


Measured memory_bytes: 6616