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

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}


int nextInt() { int x; scanf("%d", &x); return x;}
ll nextLong() { ll x; scanf("%lld", &x); return x;}

int main2() {
  int N = nextInt();
  ll A = nextInt();
  ll B = nextInt();
  ll C = nextInt();

  vector<string> ss;
  REP(i, N) {
    string s; cin >> s;
    sort(ALL(s));
    ss.push_back(s);
  }

  if (A + B + C == 0) {
    cout << "No" << endl;
    return 0;
  }
  if (A + B + C == 1) {
    int cur = A ? 'A' : B ? 'B' : 'C';
    vector<int> ans;
    bool ok = true;
    for (string s : ss) {
      if (cur == 'A') {
        if (s == "AB") { cur = 'B'; }
        if (s == "AC") { cur = 'C'; }
        if (s == "BC") { ok = false; break; }
      } else if (cur == 'B') {
        if (s == "AB") { cur = 'A'; }
        if (s == "AC") { ok = false; break; }
        if (s == "BC") { cur = 'C'; }
      } else if (cur == 'C') {
        if (s == "AB") { ok = false; break; }
        if (s == "AC") { cur = 'A'; }
        if (s == "BC") { cur = 'B'; }
      }
      ans.push_back(cur);
    }
    cout << (ok ? "Yes":"No") << endl;
    if (ok) {
      for (int x : ans) cout << (char)x << endl;
    }
    return 0;
  }

  vector<int> ans;
  bool ok = true;
  REP(i, N) {
    string s = ss[i];
    if (s == "AB") {
      if (A + B == 0) { ok = false; }
      else if (B == 0) { ans.push_back('B'); B++; A--; }
      else if (A == 0) { ans.push_back('A'); A++; B--; }
      else if (i + 1 < N) {
        string t = ss[i+1];
        if (t == "AB" || t == "BC") { ans.push_back('B'); B++; A--; }
        else { ans.push_back('A'); A++; B--; }
      } else {
        ans.push_back('A'); A++; B--;
      }
    } else if (s == "BC") {
      if (B+C == 0) { ok = false; }
      else if (B == 0) { ans.push_back('B'); B++; C--; }
      else if (C == 0) { ans.push_back('C'); C++; B--; }
      else if (i + 1 < N) {
        string t = ss[i+1];
        if (t == "AB" || t == "BC") { ans.push_back('B'); B++; C--; }
        else { ans.push_back('C'); C++; B--; }
      } else {
        ans.push_back('C'); C++; B--;
      }
    } else if (s == "AC") {
      if (A+C == 0) { ok = false; }
      else if (A == 0) { ans.push_back('A'); A++; C--; }
      else if (C == 0) { ans.push_back('C'); C++; A--; }
      else if (i + 1 < N) {
        string t = ss[i+1];
        if (t == "AC" || t == "BC") { ans.push_back('C'); C++; A--; }
        else { ans.push_back('A'); A++; C--; }
      } else {
        ans.push_back('A'); A++; C--;
      }
    }
    if (!ok) break;
  }


  cout << (ok ? "Yes":"No") << endl;
  if (ok) {
    for (int x : ans) cout << (char)x << endl;
  }
  return 0;


  return 0;
}

int main() {

#ifdef LOCAL
  for (;!cin.eof();cin>>ws)
#endif
    main2();
  return 0;
}

Measured memory_bytes: 7552