// By Mohit Gupta
#include <bits/stdc++.h>
using namespace std;
//DEBUG 
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#define printint(v) copy(begin(v), end(v), ostream_iterator<int>(cout," "))
#define printintv(s,e) copy(s,e, ostream_iterator<int>(cout," "))
#define forstl(i,v) for(auto &i: v)
#define all(v) (v).begin(), (v).end()
#define forn(i,e) for(int i = 0; i < e; i++)
#define forsn(i,s,e) for(int i = s; i < e; i++)
#define rforn(i,s) for(int i = s; i >= 0; i--)
#define rforsn(i,s,e) for(int i = s; i >= e; i--)
#define clz(a) __builtin_clz(a) // count leading zeroes
#define ctz(a) __builtin_ctz(a) // count trailing zeroes
#define popc(a) __builtin_popcount(a) // count set bits (for ints only diff for ll)
//https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html for other in built
#define ln "\n"
#define dbg(x) cout<<#x<<" = "<<x<<ln
#define pb push_back
#define fi first
#define int long long
#define se second
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
typedef pair<int,int> p32; 
typedef pair<ll,ll> p64;
typedef pair<double,double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int> > vv32;
typedef vector<p64> vp64;
typedef vector<p32> vp32;
typedef map<int,int> m32;
#pragma GCC optimize ("-O2")
const int LIM = 5e5+5, MOD = 998244353;
int t,n,m,k,x,y;
int a,b,c; 
string str;
int getType(){
  cin>>str;
  if(str=="AB") return 1;
  else if(str=="BC") return 2;
  else return 3;
}

void solve(){
  vector<char> ans;
  v32 input;
  forn(i,n) input.pb(getType());
  forn(i,n){
    x=input[i];
    // debug_out(i,a,b,c,x);
    if(x==1){
      if(a==0 && b==0){
        cout<<"No"<<ln;
        return;
      }
      else if(a==0 || (i!=n-1 && input[i+1]==3 && b!=0)) a++,b--,ans.pb('A');
      else if(b==0 || (i!=n-1 && input[i+1]==2)) b++,a--,ans.pb('B');
      else{
        a++,b--,ans.pb('A');
      }
    }
    else if(x==2){
      if(c==0 && b==0){
        cout<<"No"<<ln;
        return;
      }
      else if(b==0 || (i!=n-1 && input[i+1]==1 && c!=0)) b++,c--,ans.pb('B');
      else if(c==0 || (i!=n-1 && input[i+1]==3)) c++,b--,ans.pb('C');
      else{
        b++,c--,ans.pb('B');
      }      
    }
    else{
      if(a==0 && c==0){
        cout<<"No"<<ln;
        return;
      }
      else if(c==0 || (i!=n-1 && input[i+1]==2 && a!=0)) c++,a--,ans.pb('C');
      else if(a==0 || (i!=n-1 && input[i+1]==1)) a++,c--,ans.pb('A');
      else{
        c++,a--,ans.pb('C');
      }      
    }
    // dbg(ans.back());
  }
  cout<<"Yes"<<ln;
        for(auto ch: ans) cout<<ch<<ln;
}

int32_t main()
{
    IOS;
    cin>>n>>a>>b>>c;
    int sum=a+b+c;
    if(sum==0){
      cout<<"No"<<ln;
    }
    else if(sum==1){
      vector<char> ans;
      forn(i,n){
        int x=getType();
        if(x==1){
          if(a>0) a--,b++,ans.pb('B');
          else if(b>0) b--,a++,ans.pb('A');
          else{
            cout<<"No"<<ln;
            return 0;
          }
        }
        else if(x==2){
          if(c>0) c--,b++,ans.pb('B');
          else if(b>0) b--,c++,ans.pb('C');
          else{
            cout<<"No"<<ln;
            return 0;
          }          
        }
       else{
          if(a>0) a--,c++,ans.pb('C');
          else if(c>0) c--,a++,ans.pb('A');
          else{
            cout<<"No"<<ln;
            return 0;
          }         
       }
      }
        cout<<"Yes"<<ln;
      for(auto ch: ans) cout<<ch<<ln;
    }

    else{
      solve();
    }
}


Measured memory_bytes: 4292