// OURL: https://atcoder.jp/contests/abc166/tasks/abc166_f
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define RREP(i,a,n) for(int i=(a),i##_len=(n);i<i##_len;++i)

// http://beet-aizu.hatenablog.com/entry/2018/04/08/145516
template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){ return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));  }

template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}
template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){ for(auto &e:t) fill_v(e,v);  }

#ifdef LOCAL
#include "pprint.hpp"
pprint::PrettyPrinter printer;
#define debug(...) cerr << "[L" << __LINE__ << ":" <<#__VA_ARGS__ << "]:", printer.print(__VA_ARGS__)
#else
#define debug(...) 42
#endif

int n,a,b,c;

bool search(vector<string> &as, vector<char> &way, int idx, int a, int b, int c) {
  if (a < 0 || b < 0 || c < 0) return false;
  if (as.size() == idx) return true;
  
  string todo = as[idx];
  if (todo == "AB" && a>b) {
    todo = "BA";
    //if (a  b) {
    //  way[idx] = 'A';
    //  if (!search(as, way, idx+1, a+1, b-1, c)) {
    //    return search(as, way, idx+1, a-1, b-1, c)
    //  }
    //}
  } else if (todo == "BC" && b>c) {
    todo = "CB";
  } else if (todo == "AC" && a>c) {
    todo = "CA";
  }

  if (todo[0] == 'A') {
    way[idx] = 'A';
    if (todo[1] == 'B') {
      if(search(as, way, idx+1, a+1,b-1,c)) return true;
    } else {
      if(search(as, way, idx+1, a+1,b,c-1)) return true;
    }
  } else if (todo[0] == 'B') {
    way[idx] = 'B';
    if (todo[1] == 'A') {
      if(search(as, way, idx+1, a-1,b+1,c)) return true;
    } else {
      if(search(as, way, idx+1, a,b+1,c-1)) return true;
    }
  } else if (todo[0] == 'C') {
    way[idx] = 'C';
    if (todo[1] == 'A') {
      if(search(as, way, idx+1, a-1,b,c+1)) return true;
    } else {
      if(search(as, way, idx+1, a,b-1,c+1)) return true;
    }
  }

  if (todo[1] == 'A') {
    way[idx] = 'A';
    if (todo[0] == 'B') {
      return search(as, way, idx+1, a+1,b-1,c);
    } else {
      return search(as, way, idx+1, a+1,b,c-1);
    }
  } else if (todo[1] == 'B') {
    way[idx] = 'B';
    if (todo[0] == 'A') {
      return search(as, way, idx+1, a-1,b+1,c);
    } else {
      return search(as, way, idx+1, a,b+1,c-1);
    }
  } else if (todo[1] == 'C') {
    way[idx] = 'C';
    if (todo[0] == 'A') {
      return search(as, way, idx+1, a-1,b,c+1);
    } else {
      return search(as, way, idx+1, a,b-1,c+1);
    }
  }
  // Error
  return false;
}

void yes(vector<char> &way) {
  cout << "Yes" << endl;
  for (auto c : way) {
    cout << c << endl;
  }
}
void no() {
  cout << "No" << endl;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  cin >> n >> a >> b >> c;
  auto as = make_v<string>(n);
  auto way = make_v<char>(n);
  for (int i = 0; i < n; ++i) {
    cin >> as[i];
  }
  if (a+b+c==0) {
    no(); return 0;
  }
  else if (a+b+c >= 1) {
    if(search(as, way, 0, a, b, c)) {
      yes(way); return 0;
    } else {
      no(); return 0;
    }
  }

  return 0;
}


Measured memory_bytes: 23828