//#pragma GCC optimize ("Ofast")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/rope>
#define pb push_back
#define F first
#define S second
#define ins insert
#define mp make_pair
#define fo(i, n1, n, x) for(int i = n1; i <= n; i += x)
#define foo(i, n, n1, x) for(int i = n; i >= n1; i -= x)
#define bit __builtin_popcount
#define md (l + ((r - l) / 2))
#define all(x) x.begin(),x.end()
#define eb emplace_back
#define ub upper_bound
#define lb lower_bound
#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)

using namespace std;
//using namespace __gnu_pbds;
//using namespace __gnu_cxx;


using ll = long long;

//#define int ll

using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;



const int N = 1e5 + 11, mod = 1e9 + 7, mod2 = 998244353;
const int MAX = 1e5 + 11;
const int INF1 = 2e9 + 11;
const ll INF2 = 6e18 + 11;
const double INF3 = 1e8 + 11;
const int base = 500;
const int P = 31;
const int dx[] = {1, -1, 0, 0, 1, 1, -1, -1};
const int dy[] = {0, 0, 1, -1, 1, -1, 1, -1};
const double EPS = 1e-4;
const double PI = acos(-1.0);


//template<typename T> using ordered_set = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }


mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int n, a, b, c, cur, dp[N][5][5][5];
string st[N];
pair < pii, pii > pr[N][5][5][5];
bool solve(int x, int f, int s, int t) {
  int &res = dp[x][f][s][t];
  if (~res) return res;
  if (x == n + 1) {
    int A = a + f - 2;
    int B = b + s - 2;
    int C = c + t - 2;
    return (res = (A > -1 and B > -1 and C > -1));
  }
  int FF = f, SS = s, TT = t;
  res = 0;
  if (st[x] == "AB" and f > 0 and s < 4) {
    --f;
    ++s;
    int A = a + f - 2;
    int B = b + s - 2;
    int C = c + t - 2;
    if ((A > -1 and B > -1 and C > -1) and solve(x + 1, f, s, t)) {
      res = 1;
      pr[x][FF][SS][TT] = mp(mp(x + 1, f), mp(s, t));
    }
    --s;
    ++f;
  }
  if (st[x] == "AB" and s > 0 and f < 4) {
    ++f;
    --s;
    int A = a + f - 2;
    int B = b + s - 2;
    int C = c + t - 2;
    if ((A > -1 and B > -1 and C > -1) and solve(x + 1, f, s, t)) {
      res = 1;
      pr[x][FF][SS][TT] = mp(mp(x + 1, f), mp(s, t));
    }
    ++s;
    --f;
  }
  if (st[x] == "AC" and f > 0 and t < 4) {
    --f;
    ++t;
    int A = a + f - 2;
    int B = b + s - 2;
    int C = c + t - 2;
    if ((A > -1 and B > -1 and C > -1) and solve(x + 1, f, s, t)) {
      res = 1;
      pr[x][FF][SS][TT] = mp(mp(x + 1, f), mp(s, t));
    }
    --t;
    ++f;
  }
  if (st[x] == "AC" and t > 0 and f < 4) {
    ++f;
    --t;
    int A = a + f - 2;
    int B = b + s - 2;
    int C = c + t - 2;
    if ((A > -1 and B > -1 and C > -1) and solve(x + 1, f, s, t)) {
      res = 1;
      pr[x][FF][SS][TT] = mp(mp(x + 1, f), mp(s, t));
    }
    ++t;
    --f;
  }
  if (st[x] == "BC" and s > 0 and t < 4) {
    --s;
    ++t;
    int A = a + f - 2;
    int B = b + s - 2;
    int C = c + t - 2;
    if ((A > -1 and B > -1 and C > -1) and solve(x + 1, f, s, t)) {
      res = 1;
      pr[x][FF][SS][TT] = mp(mp(x + 1, f), mp(s, t));
    }
    --t;
    ++s;
  }
  if (st[x] == "BC" and t > 0 and s < 4) {
    ++s;
    --t;
    int A = a + f - 2;
    int B = b + s - 2;
    int C = c + t - 2;
    if ((A > -1 and B > -1 and C > -1) and solve(x + 1, f, s, t)) {
      res = 1;
      pr[x][FF][SS][TT] = mp(mp(x + 1, f), mp(s, t));
    }
    ++t;
    --s;
  }
  return res;
}
main() {
  file("threesum");
  //ios;
  cin >> n >> a >> b >> c;
  fo(i, 1, n, 1) cin >> st[i];
  memset(dp, -1, sizeof dp);
  bool ans = solve(1, 2, 2, 2);
  if (!ans) return !(cout << "No");
  cout << "Yes\n";
  cur = 1, a = 2, b = 2, c = 2;
  while (cur <= n) {
    pair < pii, pii > nxt = pr[cur][a][b][c];
//    cerr << cur << " " << a << " " << b << " " << c << "\n";
    int x = cur;
    if (st[x] == "AB") {
      if (nxt.F.S > a) {
        cout << "A\n";
      } else {
        cout << "B\n";
      }
    }
    if (st[x] == "AC") {
      if (nxt.F.S > a) {
        cout << "A\n";
      } else {
        cout << "C\n";
      }
    }
    if (st[x] == "BC") {
      if (nxt.S.F > b) {
        cout << "B\n";
      } else {
        cout << "C\n";
      }
    }
    cur = nxt.F.F, a = nxt.F.S, b = nxt.S.F, c = nxt.S.S;
  }
  return 0;
}
/**

*/


Measured memory_bytes: 266528