#include <bits/stdc++.h>
using namespace std;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef vector<vector<long long>> VVL;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef tuple<int,int,int> tpl;

#define ALL(a)  (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define LB(a,x) lower_bound((a).begin(), (a).end(), x) - (a).begin()
#define UB(a,x) upper_bound((a).begin(), (a).end(), x) - (a).begin()

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RFOR(i,a,b) for(int i=(a)-1;i>=(b);--i)
#define RREP(i,n) RFOR(i,n,0)

#define en "\n"

constexpr double EPS = 1e-9;
constexpr double PI  = 3.141592653589793238462643383279;
constexpr int INF = 2147483647;
constexpr long long LINF = 1LL<<60;
constexpr long long MOD = 1000000007; // 998244353

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

int main(void){
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int N; cin >> N;
    ll A,B,C; cin >> A >> B >> C;
    VS s(N); REP(i,N) cin >> s[i];

    vector<char> ans;
    if(A+B+C == 0){
        cout << "No" << en;
        return 0;
    }
    else{
        REP(i,N){
            if(s[i]=="AB"){
                if(A+B==0){
                    cout << "No" << en;
                    return 0;
                }
                if(A == 1 && B == 1 && i<N-1 && (s[i+1][0]=='A' || s[i+1][1]=='A')){
                    ans.push_back('A'); A++; B--;
                }
                else if(A == 1 && B == 1 && i<N-1 && (s[i+1][0]=='B' || s[i+1][1]=='B')){
                    ans.push_back('B'); A--; B++;
                }
                else if(A == 0){
                    ans.push_back('A'); A++; B--;
                }
                else if(B == 0){
                    ans.push_back('B'); A--; B++;
                }
                else if(A < B){
                    ans.push_back('A'); A++; B--;
                }
                else{
                    ans.push_back('B'); A--; B++;
                }
            }
            else if(s[i]=="AC"){
                if(A+C==0){
                    cout << "No" << en;
                    return 0;
                }
                if(A == 1 && C == 1 && i<N-1 && (s[i+1][0]=='A' || s[i+1][1]=='A')){
                    ans.push_back('A'); A++; C--;
                }
                else if(A == 1 && C == 1 && i<N-1 && (s[i+1][0]=='C' || s[i+1][1]=='C')){
                    ans.push_back('C'); A--; C++;
                }
                else if(A == 0){
                    ans.push_back('A'); A++; C--;
                }
                else if(C == 0){
                    ans.push_back('C'); A--; C++;
                }
                else if(A < C){
                    ans.push_back('A'); A++; C--;
                }
                else{
                    ans.push_back('C'); A--; C++;
                }
            }
            else{
                if(C+B==0){
                    cout << "No" << en;
                    return 0;
                }
                if(B == 1 && C == 1 && i<N-1 && (s[i+1][0]=='B' || s[i+1][1]=='B')){
                    ans.push_back('B'); B++; C--;
                }
                else if(B == 1 && C == 1 && i<N-1 && (s[i+1][0]=='C' || s[i+1][1]=='C')){
                    ans.push_back('C'); B--; C++;
                }
                else if(B == 0){
                    ans.push_back('B'); B++; C--;
                }
                else if(C == 0){
                    ans.push_back('C'); B--; C++;
                }
                else if(B < C){
                    ans.push_back('B'); B++; C--;
                }
                else{
                    ans.push_back('C'); B--; C++;
                }
            }
        }
    }
    cout << "Yes" << en;
    REP(i,N) cout << ans[i] << en;
    return 0;
}

Measured memory_bytes: 6700