#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> PII;

// chmax, chmin
template <class T>
inline bool chmax(T &a, T b)
{
  if (a < b)
  {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, T b)
{
  if (a > b)
  {
    a = b;
    return 1;
  }
  return 0;
}

template <typename T>
function<T(T, T)> op_max = [](T a, T b) -> T { return max(a, b); };
template <typename T>
function<T(T, T)> op_min = [](T a, T b) -> T { return min(a, b); };

template <typename T>
function<T(T, T)> op_sum = [](T a, T b) -> T { return a + b; };

using namespace std;
//********************  dumps ************************//

template <typename T>
void dump(const T &data, vector<int> &iter)
{
  cout << data << " ";
}
template <typename T>
void dump(const vector<T> &data, vector<int> &iter)
{
  for (auto elem : data)
    dump(elem, iter);
  cout << endl;
}

template <typename T>
void dump(const vector<vector<T>> &data, vector<int> &iter)
{
  for (auto elem : iter)
  {
    cout << "[" << elem << "]";
  }
  cout << endl;
  for (int i = 0; i < data.size(); i++)
  {
    iter.push_back(i);
    dump(data[i], iter);
    iter.pop_back();
  }
  cout << endl;
}

template <typename T>
void dump(const vector<T> &data, int dummy)
{
  for (int i = 0; i < data.size(); i++)
  {
    cout << "[" << i << "] " << data[i] << endl;
  }
}
template <typename T>
void dump(const T &data)
{ // T : data, U = base type val.
  vector<int> iter;
  dump(data, iter);
}
///////////////////////////////////////////////

const string YES = "Yes";
const string NO = "No";

int inner(LL &X, LL &Y, LL &Z, int kind)
{
  if (X == 1 && Y == 1 && Z == 0)
  {
    if (kind == 1)
    {
      return 0;
    }
    else
      return 1;
  }
  if (X < Y)
    return 0;
  else
    return 1;
}

int one(LL &X, LL &Y, LL &Z, int kind, vector<string> &ops, string op)
{
  int ret = inner(X, Y, Z, kind);
  ops.push_back(op.substr(ret, 1));
  if (ret == 0)
  {
    X++, Y--;
  }
  else
  {
    X--, Y++;
  }
  return ret;
}

vector<string> simulate(LL A, LL B, LL C, vector<string> ss)
{

  vector<string> ret;
  for (int i = 0; i < ss.size(); i++)
  {
    string s = ss[i];
    string nxt = "";
    if (i + 1 < ss.size())
      nxt = ss[i + 1];

    if (s == "AB")
    {
      int kind = 0;
      if (nxt == "AC")
        kind = 1;
      if (nxt == "BC")
        kind = 2;
      one(A, B, C, kind, ret, s);
    }

    if (s == "AC")
    {
      int kind = 0;
      if (nxt == "AB")
        kind = 1;
      if (nxt == "BC")
        kind = 2;
      one(A, C, B, kind, ret, s);
    }

    if (s == "BC")
    {
      int kind = 0;
      if (nxt == "AB")
        kind = 1;
      if (nxt == "AC")
        kind = 2;

      one(B, C, A, kind, ret, s);
    }
    if (A < 0 || B < 0 || C < 0)
      return vector<string>();
  }
  return ret;
}

void solve(long long N, long long A, long long B, long long C, std::vector<std::string> s)
{
  auto ret = simulate(A, B, C, s);

  if (ret.size() == 0)
  {
    cout << NO << endl;
  }
  else
  {
    cout << YES << endl;
    for (auto val : ret)
      cout << val << endl;
  }
}

int main()
{
  cout << setprecision(10);
  long long N;
  scanf("%lld", &N);
  long long A;
  scanf("%lld", &A);
  long long B;
  scanf("%lld", &B);
  long long C;
  scanf("%lld", &C);
  std::vector<std::string> s(N);
  for (int i = 0; i < N; i++)
  {
    std::cin >> s[i];
  }
  solve(N, A, B, C, std::move(s));
  return 0;
}


Measured memory_bytes: 13792