/**
 *     author: qodjf
 *     created: 05.04.2020 11:39:43
 */
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <unordered_set>
using namespace std;

string to_string(string s) { return '"' + s + '"'; }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) res += ", ";
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}

void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#ifndef ONLINE_JUDGE
#define dbg(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define dbg(...) 42
#endif

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

#define mst(x, a) memset(x, a, sizeof(x))
#define all(a) begin(a), end(a)
#define rep(i, begin, end)                            \
  for (__typeof(end) i = (begin) - ((begin) > (end)); \
       i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

using ll = long long;
using P = pair<int, int>;
using T = tuple<int, int, int>;
constexpr int INF = 0x3f3f3f3f;
constexpr ll LLINF = 0x3f3f3f3f3f3f3f3f;
constexpr ll MOD = 1e9 + 7;

int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, -1, 1};

int N, A, B, C;
ll sum;
vector<int> choice;
set<T> invalidStates;
vector<char> ans;

bool dfs(int i, int a, int b) {
  if (i == N) return true;
  T t = {i, a, b};
  if (invalidStates.count(t)) return false;

  if (choice[i] == 0) {
    if (b >= 1) {
      ans.push_back('A');
      if (dfs(i + 1, a + 1, b - 1)) return true;
      ans.pop_back();
    }
    if (a >= 1) {
      ans.push_back('B');
      if (dfs(i + 1, a - 1, b + 1)) return true;
      ans.pop_back();
    }
  } else if (choice[i] == 1) {
    if (sum - a - b >= 1) {
      ans.push_back('A');
      if (dfs(i + 1, a + 1, b)) return true;
      ans.pop_back();
    }
    if (a >= 1) {
      ans.push_back('C');
      if (dfs(i + 1, a - 1, b)) return true;
      ans.pop_back();
    }
  } else {
    if (sum - a - b >= 1) {
      ans.push_back('B');
      if (dfs(i + 1, a, b + 1)) return true;
      ans.pop_back();
    }
    if (b >= 1) {
      ans.push_back('C');
      if (dfs(i + 1, a, b - 1)) return true;
      ans.pop_back();
    }
  }

  invalidStates.insert(t);
  return false;
}

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

  cin >> N >> A >> B >> C;
  map<string, int> f = {{"AB", 0}, {"AC", 1}, {"BC", 2}};
  string s;
  for (int i = 0; i < N; i++) {
    cin >> s;
    int idx = f[s];
    choice.push_back(idx);
  }

  sum = (ll)A + B + C;

  if (dfs(0, A, B)) {
    puts("Yes");
    for (char ch : ans) {
      printf("%c\n", ch);
    }
  } else {
    puts("No");
  }
}


Measured memory_bytes: 11584