#include <bits/stdc++.h>
using namespace std;
using LL = long long int;
#define incID(i, l, r) for(int i = (l)    ; i <  (r); ++i)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); --i)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); ++i)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); --i)
#define inc(i, n)  incID(i, 0, n)
#define dec(i, n)  decID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define dec1(i, n) decII(i, 1, n)
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))
#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define FR front()
#define BA back()
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
auto setmin   = [](auto & a, auto b) { return (b <  a ? a = b, true : false); };
auto setmax   = [](auto & a, auto b) { return (b >  a ? a = b, true : false); };
auto setmineq = [](auto & a, auto b) { return (b <= a ? a = b, true : false); };
auto setmaxeq = [](auto & a, auto b) { return (b >= a ? a = b, true : false); };
#define SI(v) static_cast<int>(v.size())
#define RF(e, v) for(auto & e: v)
#define until(e) while(! (e))
#define if_not(e) if(! (e))
#define ef else if
#define UR assert(false)
#define IN(T, ...) T __VA_ARGS__; IN_(__VA_ARGS__);
void IN_() { };
template<typename T, typename ... U> void IN_(T & a, U & ... b) { cin >> a; IN_(b ...); };
template<typename T> void OUT(T && a) { cout << a << endl; }
template<typename T, typename ... U> void OUT(T && a, U && ... b) { cout << a << " "; OUT(b ...); }

// ---- ----

template<typename T> istream & operator>>(istream & s, vector<T> & v) { RF(e, v) { s >> e; } return s; }
template<typename T> ostream & operator<<(ostream & s, vector<T> const & v) {
	inc(i, SI(v)) { s << (i == 0 ? "" : " ") << v[i]; }
	return s;
}

int main() {
	IN(LL, n, a, b, c);
	vector<string> v(n);
	cin >> v;
	v.PB("-");
	
	auto no = [&]() { OUT("No"); exit(0); };
	string A = "AC", B = "BC", K = "AB", ans;
	auto f = [&](int s, int a, int b) {
		auto in = [&](int a, int b) { return (0 <= a && 0 <= b && a + b <= s); };
		using VT = vector<tuple<int, int, char>>;
		auto add = [&](VT & w, int a, int b, char c) { if(in(a, b)) { w.EB(a, b, c); } };
		auto AA = [&](int a, int b) -> VT { VT w; add(w, a + 1, b    , 'A'); add(w, a - 1, b    , 'C'); return w; };
		auto BB = [&](int a, int b) -> VT { VT w; add(w, a    , b + 1, 'B'); add(w, a    , b - 1, 'C'); return w; };
		auto KK = [&](int a, int b) -> VT { VT w; add(w, a + 1, b - 1, 'A'); add(w, a - 1, b + 1, 'B'); return w; };
		
		inc(i, n) {
			VT x;
			if(v[i] == A) { x = AA(a, b); }
			if(v[i] == B) { x = BB(a, b); }
			if(v[i] == K) { x = KK(a, b); }
			
			if(SI(x) == 0) { no(); }
			if(SI(x) == 1) {
				a = get<0>(x[0]);
				b = get<1>(x[0]);
				ans += get<2>(x[0]);
			} else {
				auto AP = [&]() { ans += 'A'; a++; };
				auto am = [&]() { ans += 'C'; a--; };
				auto BP = [&]() { ans += 'B'; b++; };
				auto bm = [&]() { ans += 'C'; b--; };
				auto KP = [&]() { ans += 'A'; a++; b--; };
				auto km = [&]() { ans += 'B'; a--; b++; };
				auto g = [&](int l, auto f0, auto f1) {
					inc(m, l) { if(m % 2 == 0) { f0(); } else { f1(); } }
				};
				
				int j = i;
				while(v[j] == v[i]) { j++; }
				int l = j - i;
				
				if(v[i] == A) { if(v[j] == B) { g(l, am, AP); } else { g(l, AP, am); } }
				if(v[i] == B) { if(v[j] == A) { g(l, bm, BP); } else { g(l, BP, bm); } }
				if(v[i] == K) { if(v[j] == B) { g(l, km, KP); } else { g(l, KP, km); } }
				i = j - 1;
			}
		}
	};
	
	LL sum = a + b + c;
	int ss = min(sum, 2LL);
	int aa = (a == 0 ? 0 : (a == sum ? ss : 1));
	int bb = (b == 0 ? 0 : (b == sum ? ss : 1));
	f(ss, aa, bb);
	
	OUT("Yes");
	RF(e, ans) { OUT(e); }
}


Measured memory_bytes: 9612