#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
  int n; cin >> n;
  map<char, int> cnt; rep (i, 3) cin >> cnt['A'+i];
  vector<string> s(n); for (string &i : s) cin >> i;
  string ans;
  rep (i, n) {
    char t1 = s[i][0], t2 = s[i][1], t3 = t1 ^ t2 ^ 'A' ^ 'B' ^ 'C';
    if (cnt[t1] == 0 && cnt[t2] == 0) {
      cout << "No" << endl;
      return 0;
    }
    if (cnt[t1] < cnt[t2]) swap(t1, t2);
    if (cnt[t1] == 1 && cnt[t2] == 1){// and cnt[t3] == 0) {
      if (i + 1 < n) {
        if (t1 == s[i+1][0] or t1 == s[i+1][1]) {
          swap(t1, t2);
        }
      }
    }
    ans += t2;
    cnt[t2]++;
    cnt[t1]--;
  }

  cout << "Yes" << endl;
  for (char i : ans) cout << i << endl;
  return 0;
}
