#define ENABLE_DEBUG 0
// hidden common codes{{{
#include<bits/stdc++.h>
#define ALL(v) std::begin(v),std::end(v)
#define LOOP(k) for(lint ngtkana_is_a_genius=0; ngtkana_is_a_genius<(lint)k; ngtkana_is_a_genius++)
using lint=long long;
using ld=long double;
template<class T> using numr=std::numeric_limits<T>;
struct input_t {
    template<class T> operator T() {
        T t;
        std::cin>>t;
        return t;
    }
} input;
#ifdef NGTKANA
#include<debug.hpp>
#else
#define DEBUG(...)(void)0
#endif
/*}}}*/

template<std::size_t N,class T,class...Args>auto mkvec(std::size_t sz,Args...args){
    if constexpr(N==1)return std::vector<T>(sz,args...);
    else return std::vector(sz,mkvec<N-1,T>(args...));
}

void err() {
    std::cout<<"No"<<'\n';
    exit(0);
}

int main(){
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    std::vector<lint>ans;

    lint q=input;
    std::array<lint,3> a;
    for(lint&x:a)x=input;

    std::vector<lint>queries(q);
    for(lint i=0;i<q;i++){
        std::string s=input;
        queries.at(i)=
            s=="AB"?0:
            s=="BC"?1: 2;
    }
    DEBUG(queries);

    lint n=a.at(0)+a.at(1)+a.at(2);
    if (n<=3) {/*{{{*/
        auto dp=mkvec<3,lint>(q+1,n+1,n+1);

        for(lint i=0;i<=n;i++) for(lint j=0;j<=n;j++) {
            dp.at(q).at(i).at(j)=true;
        }
        DEBUG(matrix_style<3>(dp.at(q)));

        for(lint t=q-1;t>=0;t--){
            lint c=queries.at(t);
            auto&& crr=dp.at(t);

            for(lint i=0;i<=n;i++) for(lint j=0;j<=n-i;j++) {
                if (!dp.at(t+1).at(i).at(j)) continue;

                if (c==0) {
                    if(i) crr.at(i-1).at(j+1)=true;
                    if(j) crr.at(i+1).at(j-1)=true;
                }

                if (c==1) {
                    if(j)     crr.at(i).at(j-1)=true;
                    if(i+j<n) crr.at(i).at(j+1)=true;
                }

                if (c==2) {
                    if(i)     crr.at(i-1).at(j)=true;
                    if(i+j<n) crr.at(i+1).at(j)=true;
                }
            }

            // DEBUG(c);
            // DEBUG(matrix_style<3>(crr));
        }

        if (!dp.at(0).at(a.at(0)).at(a.at(1))) {
            err();
        }

        for (lint i=0;i<q;i++) {
            lint c=queries.at(i);
            lint x=-1,y=-1;

            if (c==0) {
                x = a.at(1) && dp.at(i+1).at(a.at(0)+1).at(a.at(1)-1) ? 0 : 1;
                y = 1-x;
            }

            if (c==1) {
                x = a.at(0)+a.at(1)<n && dp.at(i+1).at(a.at(0)).at(a.at(1)+1) ? 1 : 2;
                y = 3-x;
            }

            if (c==2) {
                x = a.at(0) && dp.at(i+1).at(a.at(0)-1).at(a.at(1)) ? 2 : 0;
                y = 2-x;
            }

            ( x==0?a.at(0): x==1?a.at(1) : a.at(2) )++;
            ( y==0?a.at(0): y==1?a.at(1) : a.at(2) )--;

            ans.push_back(x);
            DEBUG((char)('A'+x),a.at(0),a.at(1),a.at(2));
        } /*}}}*/ 
    } else {/*{{{*/
        lint zc=std::count_if(ALL(a), [](lint x){ return !x; });
        if (zc==2) {
            lint c=queries.at(0);
            lint x=c, y=(c+1)%3;
            if (!a.at(x) && !a.at(y)) {
                err();
            }

            if (!a.at(x)) std::swap(x,y);
            assert(3<=a.at(x));

            a.at(x)--;
            a.at(y)++;
            ans.push_back(y);
            q--;
            queries.erase(queries.begin());
            zc--;
        }

        lint dir=1;
        std::vector<lint>ckd(3); // 貸している方に✔
        if (zc==1) {
            assert(std::count_if(ALL(a), [](lint x){ return !x; })==1);
            lint x=std::find_if(ALL(a), [](lint w){ return !w; }) - a.begin();
            lint y=std::find_if(ALL(a), [](lint w){ return 2<=w; }) - a.begin();
            assert(x!=y);
            assert(a.at(x)==0&&2<=a.at(y));
            dir = (x+1)%3==y
                ?+1
                :-1;
            ckd.at(x)=true;
        }
        DEBUG(dir,ckd);

        for(lint i=0;i<q;i++){
            lint c=queries.at(i);
            lint d=(c+1)%3;
            // 貸す、借りる
            lint x=-1,y=-1;
            if (dir==1) {
                if(ckd.at(c)) {
                    x=d;
                    ckd.at(c) = false;
                } else {
                    x=c;
                    ckd.at(c) = true;
                }
            }
            if (dir==-1) {
                if (ckd.at(d)) {
                    x=c;
                    ckd.at(d) = false;
                } else {
                    x=d;
                    ckd.at(d) = true;
                }
            }
            y=(c==0?1: c==1?3: 2)-x;
            a.at(x)--;
            a.at(y)++;
            DEBUG(x,y,a);
            ans.push_back(y);
        }
    }
    /*}}}*/

    std::cout<<"Yes"<<'\n';
    for(lint x:ans) {
        std::cout<<(char)('A' + x)<<'\n';
    }
}


Measured memory_bytes: 37080