#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <array>
#include<unordered_map>
#include<unordered_set>

using namespace std;
#define IO                 \
	ios::sync_with_stdio(0); \
cin.tie(0);              \
cout.tie(0);
#define forn(i, n) for (int i = 0; i < n; i++)
#define forse(i, s, e) for (int i = s; i < e; i++)
#define pb push_back
#define pf push_front
#define rb pop_back
#define rf pop_front
#define mp make_pair
#define fi first
#define se second
#define all(vec) vec.begin(), vec.end()
#define getcurrtime() \
	cerr << "Time = " << ((double)clock() / CLOCKS_PER_SEC) << endl

#define watch(x) cerr << (#x) << " is " << (x) << endl;

#ifndef LOCAL
#define cerr if(false)cerr
#endif
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll P=1e9+7;
double PI=3.141592653589793;
const int arrn = 2e5 + 1;

void solve(){
	ll n,a,b,c;
	cin >> n >> a >> b >> c;
	ll sum=a+b+c;
	vector<int> in(n);
	forn(i,n){
		string k;cin >> k;
		if(k=="AB") in[i]=0;
		else if(k=="AC") in[i]=1;
		else in[i]=2;
	}


	vector<char> out;
	if(sum>2){
		forn(i,n){
			if(in[i]==0){
				if(a+b==0){
					cout << "No";
					return;
				}
				if(a<b){
					a++;b--;
					out.pb('A');
				}else{
					a--;b++;
					out.pb('B');
				}
			}else if(in[i]==1){
				if(a+c==0){
					cout << "No";
					return;
				}
				if(a<c){
					a++;c--;
					out.pb('A');
				}else{
					a--;c++;
					out.pb('C');
				}
			}else{
				if(c+b==0){
					cout << "No";
					return;
				}
				if(b<c){
					b++;c--;
					out.pb('B');
				}else{
					b--;c++;
					out.pb('C');
				}
			}
		}	

	}else if(sum==2){

		forn(i,n){
			if(in[i]==0){
				if(a==0&&b==0){
					cout << "No";
					return;
				}else if(a+b==1){
					if(a>0) out.pb('B');
					else out.pb('A');
					swap(a,b);
				}else{
					if(a==2){
						a=1,b=1;
						out.pb('B');
					}else if(b==2){
						a=1,b=1;
						out.pb('A');
					}else{
						if(i==n-1||in[i+1]==0||in[i+1]==1){
							a=2;b=0;
							out.pb('A');
						}else{
							a=0;b=2;
							out.pb('B');
						}
					}
				}
			}else if(in[i]==1){
				if(a==0&&c==0){
					cout << "No";
					return;
				}else if(a+c==1){
					if(a>0) out.pb('C');
					else out.pb('A');
					swap(a,c);
				}else{
					if(a==2){
						a=1,c=1;
						out.pb('C');
					}else if(c==2){
						a=1,c=1;
						out.pb('A');
					}else{
						if(i==n-1||in[i+1]==1||in[i+1]==0){
							a=2;c=0;
							out.pb('A');
						}else{
							a=0;c=2;
							out.pb('C');
						}
					}
				}
			}else{
				if(c==0&&b==0){
					cout << "No";
					return;
				}else if(b+c==1){
					if(b>0) out.pb('C');
					else out.pb('B');
					swap(b,c);
				}else{
					if(b==2){
						b=1,c=1;
						out.pb('C');
					}else if(c==2){
						b=1,c=1;
						out.pb('B');
					}else{
						if(i==n-1||in[i+1]==2||in[i+1]==0){
							b=2;c=0;
							out.pb('B');
						}else{
							c=2;b=0;
							out.pb('C');
						}
					}
				}
			}
		}

	}else if(sum==1){
		forn(i,n){
			if(in[i]==0){
				if(a==0&&b==0){
					cout << "No";
					return;
				}else{
					if(a>0) out.pb('B');
					else out.pb('A');
					swap(a,b);
				}		
			}else if(in[i]==1){
				if(a==0&&c==0){
					cout << "No";
					return;
				}else{
					if(a>0) out.pb('C');
					else out.pb('A');
					swap(a,c);
				}		
			}else{
				if(b==0&&c==0){
					cout << "No";
					return;
				}else{
					if(c>0) out.pb('B');
					else out.pb('C');
					swap(c,b);
				}		
			}	
		}
	}else{
		cout << "No";
		return;
	}
	cout << "Yes\n";
	for(auto i:out) cout << i << '\n';
	cerr << a << ' ' << b << ' ' << c << '\n';
}

int main() {
	IO;
	int T=1;
//	cin >> T;
	forn(c,T){
		solve();
	}
}



Measured memory_bytes: 3992