#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int n; ll a, b, c;
vector<string> s;
vector<string> ans;
bool found = false;
void dfs(int id) {
  if (id == n) {
    found = true;
    return;
  }
  if (s[id] == "AB") {
    a++; b--; ans[id] = "A"; if (b >= 0)dfs(id + 1);
    if (found)return; a--; b++;
    b++; a--; ans[id] = "B"; if (a >= 0)dfs(id + 1);
    if (found)return; b--; a++;
  }
  else if (s[id] == "BC") {
    b++; c--; ans[id] = "B"; if (c >= 0)dfs(id + 1);
    if (found)return; b--; c++;
    c++; b--; ans[id] = "C"; if (b >= 0)dfs(id + 1);
    if (found)return; c--; b++;
  }
  else if (s[id] == "AC") {
    c++; a--; ans[id] = "C"; if (a >= 0)dfs(id + 1);
    if (found)return; c--; a++;
    a++; c--; ans[id] = "A"; if (c >= 0)dfs(id + 1);
    if (found)return; a--; c++;
  }
}

int main() {
  cin >> n >> a >> b >> c;
  s.resize(n); ans.resize(n);
  for (int i = 0; i < n; i++)
    cin >> s[i];
  dfs(0);
  if (found) {
    cout << "Yes" << endl;
    for (string ch : ans)cout << ch << endl;
  } else cout << "No" << endl;
  return 0;
}