#include <bits/stdc++.h>
using namespace std;
#define SORT(a) sort((a).begin(), (a).end())
#define RSORT(a) reverse((a).begin(), (a).end())
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
const long long INF = 1LL << 60;
// const int INF=1010101010;
using Graph = vector<vector<int>>;

int main() {
  int n;
  cin >> n;
  map<char, int> cnt;
  rep(i, 3) cin >> cnt['A' + i];
  vector<string> s(n + 1);
  rep(i, n) cin >> s[i];
  string ans;
  rep(i, n) {
    char t1 = s[i][0];
    char t2 = s[i][1];
    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) {
      if (t2 == s[i + 1][0] || t2 == s[i + 1][1]) {
        swap(t1, t2);
      }
    }
    ans += t1;
    cnt[t1]++;
    cnt[t2]--;
  }
  cout << "Yes" << endl;
  for (char i : ans) cout << i << endl;
  return 0;
}