//2020年4月17日現在

#include<stdio.h>
#include<cmath>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<complex>
#include<queue>
#include<set>
#include<utility>
#include<iomanip>
#include<limits>
#include<thread>
#include<map>
#include<stack>
#include<numeric>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_set>
#include<unordered_map>
#include<fstream>
#include<list>
#include<functional>
#include<bitset>
#include<tuple>
#include <cstdio>
#include <iterator>

using namespace std;

template <class... A>
void prints() { cout << "\n"; }
template <class... A>
void prints_rest() { cout << "\n"; }
template <class T, class... A>
void prints_rest(const T &first, const A &... rest) { cout << " " << first; prints_rest(rest...); }
template <class T, class... A>
void prints(const T &first, const A &... rest) { cout << first; prints_rest(rest...); }

namespace {
    // printElems(&a[0], &a[n]);　みたいな感じで使う。
    void printElems(const int* begin, const int* end)
    {
        for (const int* p = begin; p != end; ++p) {
            std::cout << *p << ' ';
        }
        std::cout << std::endl;
    }
}

#define rep(i,n) for(int i=0; i<n; i++)
#define rep1(i,n) for(int i=1; i<n+1; i++)
#define repr(i,n) for(int i=n-1; i>=0; i--)
#define repr1(i,n) for(int i=n; i>0; i--)
#define FOR(i,j,n) for(int i=j; i < n; i++)
#define souatari(i,j,n) rep1(i,n-1)rep(j,i)
#define souatari1(i,j,n) for(int i=2; i<n+1; i++)rep1(j,i-1)
#define mp make_pair
#define F first
#define S second
#define elif else if

typedef long long ll;
typedef vector<int>  vi;
typedef vector<vi>  vvi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef array<int,3> arr3;
typedef long double D;


const ll llinf =  numeric_limits<ll>::max();
const ll _llinf = numeric_limits<ll>::lowest();
const int inf = numeric_limits<int>::max();
const int _inf = numeric_limits<int>::lowest();
const double dinf = numeric_limits<double>::infinity();
const ll MOD = 1000000007;
const ll BIG = 10000000000000000;




int slist[100005];

int main(){
    int n,a,b,c;
    cin >> n >> a >> b >> c;
    rep(i,n){
        string tmp;
        cin >> tmp;
        if(tmp == "AB")slist[i] = 1;
        if(tmp == "BC")slist[i] = 2;
        if(tmp == "AC")slist[i] = 3;
    }
    vector<string> anslist;
    bool flag = true;
    rep(i,n){
        if(slist[i] == 1){
            if(a == 0 && b == 0){
                flag = false;
                break;
            }
            if(a == 1 && b == 1){
                if(slist[i+1] == 2){
                    a--;b++;
                    anslist.push_back("B");
                }
                else{
                    b--;a++;
                    anslist.push_back("A");
                }
                continue;
            }
            if(a>=b){
                a--;b++;
                anslist.push_back("B");
            }
            else{
                b--;a++;
                anslist.push_back("A");
            }
        }
        if(slist[i] == 2){
            if(c == 0 && b == 0){
                flag = false;
                break;
            }
            if(c == 1 && b == 1){
                if(slist[i+1] == 1){
                    c--;b++;
                    anslist.push_back("B");
                }
                else{
                    b--;c++;
                    anslist.push_back("C");
                }
                continue;
            }
            if(c>=b){
                c--;b++;
                anslist.push_back("B");
            }
            else{
                b--;c++;
                anslist.push_back("C");
            }
        }
        if(slist[i] == 3){
            if(c == 0 && a == 0){
                flag = false;
                break;
            }
            if(a == 1 && c == 1){
                if(slist[i+1] == 2){
                    a--;c++;
                    anslist.push_back("C");
                }
                else{
                    c--;a++;
                    anslist.push_back("A");
                }
                continue;
            }

            if(c>=a){
                c--;a++;
                anslist.push_back("A");
            }
            else{
                a--;c++;
                anslist.push_back("C");
            }
        }
    }
    if(flag){
        prints("Yes");
        rep(i,n) prints(anslist[i]);
    }
    else{
        prints("No");
    }

	return 0;
}



Measured memory_bytes: 7852