#include <bits/stdc++.h>
using namespace std;
static auto faster_iostream = []() { ios::sync_with_stdio(0); cin.tie(0); return 0; }();void print(){cout<<'\n';}template<class T,class ...U>void print(T x, U ...y){cout<<x<<' ';print(y...);}
typedef long long ll; typedef long double db;
const int N = 1e5 + 5, M = 1e9 + 7;
ll qpow(ll x, ll n) { ll res = 1; for (; n; n >>= 1, x = x * x % M) if (n & 1) res = res * x % M; return res; }

int main() {
  int n, a[3];
  cin >> n >> a[0] >> a[1] >> a[2];
  vector<string> q(n);
  for (auto &s : q) cin >> s;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    int u = q[i][0] - 'A', v = q[i][1] - 'A';
    if (a[u] == 0 && a[v] == 0) {
      cout << "No\n";
      exit(0);
    }
    if (!a[u]) a[u]++, a[v]--, ans.push_back(u);
    else if (!a[v]) a[u]--, a[v]++, ans.push_back(v);
    else if (a[u] == 1 && a[v] == 1 && i + 1 < n) {
      int w = 0, x = q[i+1][0] - 'A', y = q[i+1][1] - 'A';
      while (w == u || w == v) w++;
      if (a[w] || w != x && w != y) {
        a[u]++, a[v]--;
        ans.push_back(u);
        continue;
      }
      if (w == x && u == y || w == y && u == x) {
        a[u]++, a[v]--, ans.push_back(u);
      } else {
        a[v]++, a[u]--, ans.push_back(v);
      }
    } else if (a[u] >= a[v]) {
      a[v]++, a[u]--, ans.push_back(v);
    } else {
      a[u]++, a[v]--, ans.push_back(u);
    }
  }
  cout << "Yes" << '\n';
  for (int i = 0; i < n; i++) {
    cout << (char)(ans[i] + 'A') << '\n';
  }
}
