#include <bits/stdc++.h>
#define ALL(a)  (a).begin(),(a).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
template <typename T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template <typename T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
const int INT_INF = 1 << 30;
#define MOD 1000000007LL
#define endl "\n"

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll N, A, B, C;
  cin >> N >> A >> B >> C;
  ll AA = A, BB = B, CC = C;
  vll query(N);
  for(int i = 0; i < N; i++){
    string s;
    cin >> s;
    if(s == "AB") query.at(i) = 0;
    else if(s == "BC") query.at(i) = 1;
    else query.at(i) = 2;
  }

  bool ok = true;
  if(query.at(0) == 0 && A == 0 && B == 0) ok = false;
  if(query.at(0) == 1 && B == 0 && C == 0) ok = false;
  if(query.at(0) == 2 && C == 0 && A == 0) ok = false;

  if((A == 1 && B == 0 && C == 0) || (A == 0 && B == 1 && C == 0) || (A == 0 && B == 0 && C == 1)){
    for(int i = 0; i < N; i++){
      if(query.at(i) == 0){
        if(A == 0 && B == 0) ok = false;
        if(A == 1){
          A = 0; B = 1;
        }
        else{
          A = 1; B = 0;
        }
      }
      else if(query.at(i) == 1){
        if(B == 0 && C == 0) ok = false;
        if(B == 1){
          B = 0; C = 1;
        }
        else{
          B = 1; C = 0;
        }
      }
      else{
        if(C == 0 && A == 0) ok = false;
        if(C == 1){
          C = 0; A = 1;
        }
        else{
          C = 1; A = 0;
        }
      }
    }
  }
  if(!ok){
    cout << "No" << endl;
    return 0;
  }
  else cout << "Yes" << endl;

  A = AA; B = BB; C = CC;
  for(int i = 0; i < N; i++){
    if(query.at(i) == 0){
      if(A == 1 && B == 1 && C == 0 && i != N-1){
        if(query.at(i+1) == 0){
          cout << 'A' << endl;
          A++; B--;
        }
        else if(query.at(i+1) == 1){
          cout << 'B' << endl;
          A--; B++;
        }
        else{
          cout << 'A' << endl;
          A++; B--;
        }
      }
      else if(A >= B){
        cout << 'B' << endl;
        A--; B++;
      }
      else{
        cout << 'A' << endl;
        A++; B--;
      }
    }
    else if(query.at(i) == 1){
      if(A == 0 && B == 1 && C == 1 && i != N-1){
        if(query.at(i+1) == 0){
          cout << 'B' << endl;
          B++; C--;
        }
        else if(query.at(i+1) == 1){
          cout << 'B' << endl;
          B++; C--;
        }
        else{
          cout << 'C' << endl;
          B--; C++;
        }
      }
      else if(B >= C){
        cout << 'C' << endl;
        B--; C++;
      }
      else{
        cout << 'B' << endl;
        B++; C--;
      }
    }
    else{
      if(A == 1 && B == 0 && C == 1 && i != N-1){
        if(query.at(i+1) == 0){
          cout << 'A' << endl;
          C--; A++;
        }
        else if(query.at(i+1) == 1){
          cout << 'C' << endl;
          C++; A--;
        }
        else{
          cout << 'C' << endl;
          C++; A--;
        }
      }
      else if(C >= A){
        cout << 'A' << endl;
        C--; A++;
      }
      else{
        cout << 'C' << endl;
        C++; A--;
      }
    }
  }
}


Measured memory_bytes: 3992