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

long long n, d[3] = {};
string res;
vector<string> s;

bool solve();

int main() {
  cin >> n;
  for (int i = 0; i < 3; ++i) cin >> d[i];
  s.resize(n);
  for (int i = 0; i < n; ++i) cin >> s[i];
  if (solve()) {
    cout << "Yes" << endl;
    for (int i = 0; i < n; ++i) cout << res[i] << endl;
  } else
    cout << "No" << endl;
  return 0;
}

bool solve() {
  if (d[0] + d[1] + d[2] == 0) return 0;
  for (int i = 0; i < n; ++i) {
    string now = s[i];
    int x = now[0] - 'A', y = now[1] - 'A';
    if (d[x] > d[y])
      swap(x, y);
    else if (d[x] == d[y]) {
      if (d[x] == 0) return 0;
      if (i + 1 < n && s[i] != s[i + 1] &&
          (y == s[i + 1][0] - 'A' || y == s[i + 1][1] - 'A'))
        swap(x, y);
    }
    ++d[x];
    --d[y];
    res += x + 'A';
  }
  return 1;
}
