#include "bits/stdc++.h"
#define int long long
#define endl '\n'
using namespace std;
 
typedef long long ll;
#define db(x) cerr << #x << ": " << x << '\n';
#define read(a) int a; cin >> a;
#define readb(a, b) int a, b; cin >> a >> b;
#define readc(a, b, c) int a, b, c; cin >> a >> b >> c;
#define readarr(a, n) int a[(n) + 1] = {}; FOR(i, 1, (n)) {cin >> a[i];}
#define readmat(a, n, m) int a[n + 1][m + 1] = {}; FOR(i, 1, n) {FOR(j, 1, m) cin >> a[i][j];}

#define print(a) cout << a << endl;
#define printarr(a, n) FOR (i, 1, n) cout << a[i] << " "; cout << endl;
#define printv(v) for (int i: v) cout << i << " "; cout << endl;
#define printmat(a, n, m) FOR (i, 1, n) {FOR (j, 1, m) cout << a[i][j] << " "; cout << endl;} cout << endl;
#define all(v) v.begin(), v.end()
#define sz(v) (int)(v.size())
#define rz(v, n) v.resize((n) + 1);
#define pb push_back
#define fi first
#define se second
#define vi vector <int>
#define pi pair <int, int>
#define vpi vector <pi>
#define vvi vector <vi>
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORD(i, a, b) for (int i = (a); i >= (b); i--)
const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll N = 2e5 + 1;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 int power (int a, int b = mod - 2)
{
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	read(n);
	readc(a, b, c);
	string s[n + 10];
	FOR (i, 1, n) cin >> s[i];
	s[n + 1] = "AB"; 
	
	string ans;
	//if ((a && b && c) || (a + b + c > 2 && a+b>0 && c+b>0 && a+c>0))
	{
	    FOR (i, 1, n)
	    {
	        if ((a + b + c == 2 && a+b>0 && c+b>0 && a+c>0))
	        {
	            string p;
	            if (a == 1 && b == 1) p = "AB";
	            if (a == 1 && c == 1) p = "AC";
	            if (b == 1 && c == 1) p = "BC";
	            
	            if ((p != s[i] || i == n) || s[i + 1] == p) goto meow2;
	            if (p == "BC")
	            {
	                if (s[i + 1] == "AC") c++, b--, ans.pb('C');
	                else c--, b++, ans.pb('B'); 
	            }
	            
	            if (s[i] == "AB")
    	        {
    	            if (s[i + 1] == "AC") a++, b--, ans.pb('A');
    	            else a--, b++, ans.pb('B');
    	        }
    	        
    	        if (s[i] == "AC")
    	        {
    	            if (s[i + 1] == "AB") a++, c--, ans.pb('A');
    	            else a--, c++, ans.pb('C');
    	        }
    	        
    	        goto meow;
	        }
	        
	        meow2:;
	        if (s[i] == "AB")
	        {
	            if (a < b) a++, b--, ans.pb('A');
	            else a--, b++, ans.pb('B');
	        }
	        
	        if (s[i] == "AC")
	        {
	            if (a < c) a++, c--, ans.pb('A');
	            else a--, c++, ans.pb('C');
	        }
	        
	        if (s[i] == "BC")
	        {
	            if (c < b) c++, b--, ans.pb('C');
	            else c--, b++, ans.pb('B');
	        }
	        
	        meow:;
	        if ((a < 0) || (b < 0) || (c < 0)) {cout << "No"; return 0;}
	    }
	    
	    cout << "Yes\n";
	    FOR (i, 0, sz(ans) - 1) cout << ans[i] << endl;
	}
	
	
	
}



















Measured memory_bytes: 6920