/*************************************************************************
    > File Name: solve.cpp
    > Author: liupo
    > Mail: lanzongwei@gmail.com
    > Created Time: 2020-05-03 22:16:10
 ************************************************************************/

#define GOODOJ
#define SYNC 0

#ifdef GOODOJ
#include <bits/stdc++.h>
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
#include <chrono>
#include <random>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#else
#include <iostream>
#include <cstdio>
#include <cmath>
#include <set>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <deque>
#include <vector>
#include <limits>
#include <cassert>
#include <sstream>
#include <iterator>
#include <functional>
#endif
using namespace std;

#define endl '\n'
#define fep(i,b,e) for(int i=(b);i<(e);++i)
#define rep(i,x) for(int i=0;i<(x);++i)
#define rap(i,x) for(auto& i : (x))
#define seg(t) (t).begin(), (t).end()
#define ep emplace_back
#define mkp make_pair
#define mkt make_tuple
#define qxx(i,x) for(int i = head[x]; ~i; i = node[i].nex)
#define F first
#define S second
#define lowbit(x) ((-(x))&(x))
#define RE register
#define getchar() getchar_unlocked()
#ifdef DEBUG
void err(istream_iterator<string>){}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << ' ';
    err(++it, args...);
}
#define debug(args...) {string _s=#args;replace(seg(_s),',',' ');\
cerr<<"DEBUG:";istringstream it(_s);\
err(istream_iterator<string>(it), args);cerr<<endl;}
#else
#define debug(...)
#endif

template<typename T> inline bool cmax(T& a,const T& b) {return a<b?a=b,1:0;}
template<typename T> inline bool cmin(T& a,const T& b) {return a>b?a=b,1:0;}

#ifdef GOODOJ
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
typedef __gnu_pbds::priority_queue<int> pq;
#endif
typedef std::string str;
typedef long long ll;
typedef double db;
typedef pair<int, int> pa;

const double P = acos(-1.0), eps = 1e-9;
struct point { db x ,y;};
inline int sign(db a) {return a < -eps ? -1 : a > eps;}
#define dot(p1,p2,p3) ((p2.x-p1.x)*(p3.x-p1.x)+(p2.y-p1.y)*(p3.y-p1.y))
#define cross(p1,p2,p3) ((p2.x-p1.x)*(p3.y-p1.y)-(p3.x-p1.x)*(p2.y-p1.y))
#define crossOp(p1,p2,p3) sign(cross(p1,p2,p3))

const int Ma = 1e5 + 100, inf = 0x3f3f3f3f, mod = 1e9 + 7;

str ss[Ma];
int ans[Ma];

signed main() {
    #if SYNC==0
    ios::sync_with_stdio(false);
    cin.tie(0);
    #endif
	int n, a[3];
	cin >> n >> a[0] >> a[1] >> a[2];
	rep (i, n) cin >> ss[i];
	bool can = true;
	for (int i = 0; can and i < n; i++) {
		str s; s = ss[i];
		int k1 = s[0] - 'A', k2 = s[1] - 'A';
		debug(s, a[k1], a[k2]);
		if (a[k1] > a[k2]) --a[k1], ++a[k2], ans[i] = k2;
		else if (a[k1] < a[k2]) --a[k2], ++a[k1], ans[i] = k1;
		else {
			if (i + 1 == n) --a[k1], ++a[k2];
			else {
				int kk1 = ss[i + 1][0] - 'A', kk2 = ss[i + 1][1] - 'A';
				if (kk1 == k1 or kk1 == k2) {
					++a[kk1], --a[k1 + k2 - kk1], ans[i] = kk1;
				} else if (kk2 == k1 or kk2 == k2)
					++a[kk2], --a[k1 + k2 - kk2], ans[i] = kk2;
			}
		}
		if (a[k1] < 0 or a[k2] < 0) can = false;
	}
	cout << (can ? "Yes" : "No") << endl;
	if(can)rep (i, n)
		cout << char('A' + ans[i]) << endl;
    
    return 0;
}


Measured memory_bytes: 7144