#include <bits/stdc++.h>
#include <stdlib.h>
#include <time.h> 
 
using namespace std;
long long mod = 1e9 + 7;
long long INF = 1e7;
double EPS = 1e-12;
typedef long long int lld;
long double tick(){static clock_t oldt; clock_t newt=clock();
    long double diff=1.0L*(newt-oldt)/CLOCKS_PER_SEC; oldt = newt; return diff; }
#define rep(i,a,n) for(long long int i = (a); i <= (n); ++i)
#define repI(i,a,n) for(int i = (a); i <= (n); ++i)
#define repD(i,a,n) for(long long int i = (a); i >= (n); --i)
#define repDI(i,a,n) for(int i = (a); i >= (n); --i)
inline lld sc() { lld a; scanf("%lld", &a); return a; }
inline int scd() { int a; scanf("%d", &a); return a; }
inline double scf() { double a; scanf("%lf",&a); return a; }
#define prL(a) printf("%lld\n",a)
#define prS(a) printf("%lld ",a)
#define prdL(a) printf("%d\n",a)
#define prdS(a) printf("%d ",a)
#define all(c) (c).begin(), (c).end()
#define sz(a) ((int)a.size())
#define Error(x...) { cout << "(" << #x << ")" << " = ( "; printIt(x); }
template <typename T1> void printIt(T1 t1) { cout << t1 << " )" << endl; }
template <typename T1, typename... T2>
void printIt(T1 t1, T2... t2) { cout << t1 << " , "; printIt(t2...); }
#define errorpair(a) cout<<#a<<" = ( "<<((a).first)<<" , "<<((a).second)<<" )\n";
#define mset(a, v) memset(a, v, sizeof(a))
#define popcount __builtin_popcountll

typedef pair<lld,lld> PA;

lld powP(lld x, lld y) {
    lld ans = 1, po = x % mod;
    while(y > 0) {
        if(y & 1) ans = ans * po % mod;
        y >>= 1; po = po * po % mod;
    }
    return ans;
}
 
bool bitSet(lld n, lld bit){
    if((n & (1LL << bit)) != 0) return true;
    else return false;
}
 
lld findGcd(lld a, lld b){
    while(a != 0) { lld temp = b % a; b = a; a = temp; }
    return b;
}

#define lim 300010
#define lim2 200010
#define qqqqqq 210
// Ab :)
// inline lld sqr(lld x) { return x * x; }
// unordered_map<lld,lld>::iterator it;
// std::ios::sync_with_stdio(false);
// priority_queue<PA> Q;
// lld dp[1<<18];

// vector<lld> G[lim];
// string S[lim];
lld A[lim], NextPos[lim][3], Rem[lim][3];
PA Choices[lim];

int main(){
    lld n = sc();
    rep(i,0,2) A[i] = sc();
    rep(i,1,n) {
        string S;
        cin >> S;
        Choices[i] = {S[0] - 'A', S[1] - 'A'};
    }
    rep(j,0,2) NextPos[n][j] = INT_MAX, Rem[n][j] = 0;
    repD(i,n-1,1) {
        rep(j,0,2) NextPos[i][j] = NextPos[i + 1][j], Rem[i][j] = Rem[i + 1][j];
        NextPos[i][Choices[i + 1].first] = i + 1;
        NextPos[i][Choices[i + 1].second] = i + 1;
        Rem[i][Choices[i + 1].first]++;
        Rem[i][Choices[i + 1].second]++;
    }
    std::vector<lld> Ans;
    bool poss = true;
    rep(i,1,n) {
        // if(i > 1) {
        //     Error((char)(Ans.back() + 'A'), A[0], A[1], A[2]);
        // }
        auto& ch = Choices[i];
        // if(A[ch.first] > 1) {
        //     Ans.push_back(ch.second);
        //     A[ch.second]++; A[ch.first]--;  continue;
        // }
        // if(A[ch.second] > 1) {
        //     Ans.push_back(ch.first);
        //     A[ch.first]++; A[ch.second]--; continue;
        // }
        if(A[ch.first] == 0 and A[ch.second] == 0) {
            poss = false;
            break;
        }
        if(A[ch.first] == 0) {
            Ans.push_back(ch.first);
            A[ch.first]++; A[ch.second]--; continue;
        }
        if(A[ch.second] == 0) {
            Ans.push_back(ch.second);
            A[ch.second]++; A[ch.first]--; continue;
        }
        if(NextPos[i][ch.first] <= NextPos[i][ch.second]) {
            Ans.push_back(ch.first);
            A[ch.first]++; A[ch.second]--; continue;
        }
        else {
            Ans.push_back(ch.second);
            A[ch.second]++; A[ch.first]--; continue;
        }
    }
    if(not poss) {
        printf("No\n");
        return 0;
    }
    printf("Yes\n");
    for(auto c : Ans) printf("%c\n", (int)c + 'A');
    return 0;
}


Measured memory_bytes: 10652