#include <bits/stdc++.h>
using namespace std;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;

int N, A, B, C;
vector<string> v;

int main(){
  cin >> N >> A >> B >> C;
  rep(i,N){
    string s;
    cin >> s;
    v.push_back(s);
  }

  if(A+B+C == 0){
    cout << "No" << endl;
  }
  else if(A+B+C == 1){
    vector<char> ret(N, '-');
    rep(i,N){
      if(v[i] == "AB"){
        if(A > 0){
          A--;
          B++;
          ret[i] = 'B';
        }else{
          B--;
          A++;
          ret[i] = 'A';
        }
      }
      if(v[i] == "AC"){
        if(A > 0){
          A--;
          C++;
          ret[i] = 'C';
        }else{
          C--;
          A++;
          ret[i] = 'A';
        }
      }
      if(v[i] == "BC"){
        if(B > 0){
          B--;
          C++;
          ret[i] = 'C';
        }else{
          C--;
          B++;
          ret[i] = 'B';
        }
      }
      if(A < 0 || B < 0 || C < 0){
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    rep(i,ret.size()){
      cout << ret[i] << endl;
    }
  }
  else{
    vector<char> ret(N, '-');
    rep(i,N){
      if(v[i] == "AB"){
        if(A == 0){
          A++;
          B--;
          ret[i] = 'A';
        }
        else if(B == 0){
          A--;
          B++;
          ret[i] = 'B';
        }
        else{
          if(i+1<N){
            if(v[i+1] == "AC"){
              A++;
              B--;
              ret[i] = 'A';
            }
            else{
              A--;
              B++;
              ret[i] = 'B';
            }
          }else{
            A++;
            B--;
            ret[i] = 'A';
          }
        }
      }      
      if(v[i] == "AC"){
        if(A == 0){
          A++;
          C--;
          ret[i] = 'A';
        }
        else if(C == 0){
          A--;
          C++;
          ret[i] = 'C';
        }
        else{
          if(i+1<N){
            if(v[i+1] == "AB"){
              A++;
              C--;
              ret[i] = 'A';
            }
            else{
              A--;
              C++;
              ret[i] = 'C';
            }
          }else{
            A++;
            C--;
            ret[i] = 'A';
          }
        }
      }      
      if(v[i] == "BC"){
        if(B == 0){
          B++;
          C--;
          ret[i] = 'B';
        }
        else if(C == 0){
          B--;
          C++;
          ret[i] = 'C';
        }
        else{
          if(i+1<N){
            if(v[i+1] == "AC"){
              B--;
              C++;
              ret[i] = 'C';
            }
            else{
              B++;
              C--;
              ret[i] = 'B';
            }
          }else{
            B++;
            C--;
            ret[i] = 'B';
          }
        }
      }      

      if(A < 0 || B < 0 || C < 0){
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    rep(i,ret.size()){
      cout << ret[i] << endl;
    }
  }

  
  return 0;
}



Measured memory_bytes: 7468