#include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>
#include <unordered_map>

template <class T, class U>
inline bool chmin(T &lhs, const U &rhs) {
  if (lhs > rhs) {
    lhs = rhs;
    return true;
  }
  return false;
}

template <class T, class U>
inline bool chmax(T &lhs, const U &rhs) {
  if (lhs < rhs) {
    lhs = rhs;
    return true;
  }
  return false;
}

// [l, r) from l to r
struct range {
  struct itr {
    int i;
    constexpr itr(int i_): i(i_) { }
    constexpr void operator ++ () { ++i; }
    constexpr int operator * () const { return i; }
    constexpr bool operator != (itr x) const { return i != x.i; }
  };
  const itr l, r;
  constexpr range(int l_, int r_): l(l_), r(std::max(l_, r_)) { }
  constexpr itr begin() const { return l; }
  constexpr itr end() const { return r; }
};

// [l, r) from r to l
struct revrange {
  struct itr {
    int i;
    constexpr itr(int i_): i(i_) { }
    constexpr void operator ++ () { --i; }
    constexpr int operator * () const { return i; }
    constexpr bool operator != (itr x) const { return i != x.i; }
  };
  const itr l, r;
  constexpr revrange(int l_, int r_): l(l_ - 1), r(std::max(l_, r_) - 1) { }
  constexpr itr begin() const { return r; }
  constexpr itr end() const { return l; }
};

int main() {
  int N, A, B, C;
  std::cin >> N >> A >> B >> C;
  if (A + B + C == 2) {
    std::unordered_map<char, int> cur;
    cur['A'] = A;
    cur['B'] = B;
    cur['C'] = C;
    std::vector<char> ans(N);
    std::vector<char> s(N), t(N);
    for (int i: range(0, N)) {
      std::cin >> s[i] >> t[i];
    }
    for (int i: range(0, N)) {

      if (cur[s[i]] + cur[t[i]] == 0) {
        std::cout << "No\n";
        return 0;
      } 
      if (cur[s[i]] > cur[t[i]]) {
        ans[i] = t[i];
        cur[s[i]]--;
        cur[t[i]]++;
        continue;
      }
      if (cur[t[i]] > cur[s[i]]) {
        ans[i] = s[i];
        cur[s[i]]++;
        cur[t[i]]--;
        continue;
      }
      if (i + 1 < N) {
        if (s[i] == s[i + 1]) {
          ans[i] = s[i];
          cur[s[i]]++;
          cur[t[i]]--;
          continue;
        }
        if (t[i] == t[i + 1]) {
          ans[i] = t[i];
          cur[s[i]]--;
          cur[t[i]]++;
          continue;
        }
        if (s[i] == t[i + 1]) {
          ans[i] = s[i];
          cur[s[i]]++;
          cur[t[i]]--;
          continue;
        }
        if (t[i] == s[i + 1]) {
          ans[i] = t[i];
          cur[s[i]]--;
          cur[t[i]]++;
          continue;
        }
      }
      else {
        ans[i] = s[i];
        cur[s[i]]++;
        cur[t[i]]--;
      }
    }
    std::cout << "Yes\n";
    for (char c: ans) {
      std::cout << c << '\n';
    }
  }
  else {
    std::unordered_map<char, int> cur;
    cur['A'] = A;
    cur['B'] = B;
    cur['C'] = C;
    std::vector<char> ans(N);
    for (int i: range(0, N)) {
      char s, t;
      std::cin >> s >> t;
      if (cur[s] + cur[t] == 0) {
        std::cout << "No\n";
        return 0;
      }
      if (cur[s] >= cur[t]) {
        ans[i] = t;
        cur[s]--;
        cur[t]++;
      }
      else {
        ans[i] = s;
        cur[s]++;
        cur[t]--;
      }
    }
    std::cout << "Yes\n";
    for (char c: ans) {
      std::cout << c << '\n';
    }
  }
  return 0;
}


Measured memory_bytes: 3932