#pragma region kyomukyomupurin

/**
 *    author  : 𝒌𝒚𝒐𝒎𝒖𝒌𝒚𝒐𝒎𝒖𝒑𝒖𝒓𝒊𝒏
 *    created : 2020-05-04 13:59:23
 **/

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

using int64 = long long;

template <class T>
using binary_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template <class T, class U>
std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& p) {
  return os << '(' << p.first << ", " << p.second << ')';
}

template <class T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) {
  int flag = 0;
  for (auto e : vec) os << (flag++ ? ", " : "{") << e;
  return os << (vec.empty() ? "{}" : "}");
}

template <class T>
std::ostream& operator<<(std::ostream& os, const std::set<T>& st) {
  int flag = 0;
  for (auto e : st) os << (flag++ ? ", " : "{") << e;
  return os << (st.empty() ? "{}" : "}");
}

template <class T, class U>
std::ostream& operator<<(std::ostream& os, const std::map<T, U>& mp) {
  int flag = 0;
  for (auto e : mp) os << (flag++ ? ", " : "{") << e;
  return os << (mp.empty() ? "{}" : "}");
}

template <class T>
std::istream& operator>>(std::istream& is, std::vector<T>& vec) {
  for (T& e : vec) is >> e;
  return is;
}

#define all(_) begin(_), end(_)
#define rall(_) rbegin(_), rend(_)

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif

void debug_out() { std::cerr << '\n'; }

template <class Head, class... Tail>
void debug_out(Head&& head, Tail&&... tail) {
  std::cerr << head;
  if (sizeof...(Tail) != 0) std::cerr << ", ";
  debug_out(std::forward<Tail>(tail)...);
}

#pragma endregion kyomukyomupurin

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int n, a, b, c;
  cin >> n >> a >> b >> c;
  vector<string> s(n);
  cin >> s;

  string ans = "";

  for (int i = 0; i < n; ++i) {
    debug(i, a, b, c);
    if (s[i] == "AB") {
      if (a == 0 && b == 0) {
        cout << "No" << '\n'; return 0;
      } else if (a == 1 && b == 1) {
        if (c == 0) {
          if (i == n - 1) {
            ans += 'A';
          } else {
            if (s[i + 1] == "BC") {
              --a; ++b; ans += 'B';
            } else {
              ++a; --b; ans += 'A';
            }
          }
        } else {
          ++a; --b; ans += 'A';
        }
      } else {
        if (a > b) {
          --a; ++b; ans += 'B';
        } else {
          ++a; --b; ans += 'A';
        }
      }
    } else if (s[i] == "BC") {
      if (b == 0 && c == 0) {
        cout << "No" << '\n'; return 0;
      } else if (b == 1 && c == 1) {
        if (a == 0) {
          if (i == n - 1) {
            ans += 'B';
          } else {
            if (s[i + 1] == "AB") {
              ++b; --c; ans += 'B';
            } else {
              --b; ++c; ans += 'C';
            }
          }
        } else {
          ++b; --c; ans += 'B';
        }
      } else {
        if (b > c) {
          --b; ++c; ans += 'C';
        } else {
          ++b; --c; ans += 'B';
        }
      }
    } else {
      if (a == 0 && c == 0) {
        cout << "No" << '\n'; return 0;
      } else if (a == 1 && c == 1) {
        if (b == 0) {
          if (i == n - 1) {
            ans += 'A';
          } else {
            if (s[i + 1] == "AB") {
              ++a; --c; ans += 'A';
            } else {
              --a; ++c; ans += 'C';
            }
          }
        } else {
          ++a; --c; ans += 'A';
        }
      } else {
        if (a > c) {
          --a; ++c; ans += 'C';
        } else {
          ++a; --c; ans += 'A';
        }
      }
    }
  }

  cout << "Yes" << '\n';
  for (char e : ans) {
    cout << e << '\n';
  }

  return 0;
}

Measured memory_bytes: 6692