#include <bits/stdc++.h>
#define rep(i,a,b) for(auto i=(a);i<(b);i++)
#define per(i,a,b) for(auto i=(a);i>=(b);i--)
#define Min(a,b) ((a) < (b) ? (a) : (b))
#define Max(a,b) ((a) > (b) ? (a) : (b))
#define int_inf 0x3f3f3f3f
#define int_max 2147483647
#define ll_max 9223372036854775807
#define ull_max 18446744073709551615
#define ll_inf 0x7f7f7f7f7f7f7f7f
#define lowbit(x) (x)&(-x)
#define mp make_pair
#define fi first
#define se second
#define pb push_back
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
const ll mod=1e9+7;
template<class T>
inline T read()
{
	T x=0,f=1;char s=getchar();
	while(s<'0'||s>'9') {if(s=='-')f=-1;s=getchar();};
	while(s>='0'&&s<='9'){x=(x<<3)+(x<<1)+s-48;s=getchar();};
	return x*f;
}
template<typename T>
inline void wri(T x)
{
	if(x<0){x=-x;putchar('-');};
	if(x/10) wri(x/10);
	putchar(x%10+48);
}
template<typename T>
inline void print(T x,char s)
{
	wri(x);
	putchar(s);
}
template<typename T>
T gcd(T a,T b)
{
	return b==0?a:gcd(b,a%b);
}
//关闭流同步就不能手写读入优化啦
int n,a,b,c;
string k;
string s[1000005];
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    cin>>n>>a>>b>>c;
    int flag=0;
    rep(i,0,n) cin>>s[i];
    
	if(a+b+c==0){
		cout<<"No"<<endl;
		return 0;
	}
	else if(a+b+c==1){
		rep(i,0,n){
	    	if(s[i]=="AC"){
	    		if(a==0&&c==0){
	    			flag=1;
	    			break;
				}
	    		else{
	    			if(a<c) a++,c--,k+="A";
					else c++,a--,k+="C";
				}
					
			}
			else if(s[i]=="AB"){
				if(a==0&&b==0){
					flag=1;
					break;
				}
				else{
					if(a<b) a++,b--,k+="A";
					else b++,a--,k+="B";
				}
			}
			else{
				if(c==0&&b==0){
					flag=1;
					break;
				}
				else{
					if(c<b) c++,b--,k+="C";
					else b++,c--,k+="B";
				}
			}
		}
		if(flag){
			cout<<"No";
		}
		else{
			cout<<"Yes"<<endl;
			rep(i,0,k.size()){
				cout<<k[i]<<endl;
			}
		}
	}
	else if(a+b+c==2){
		rep(i,0,n){
	    	if(s[i]=="AC"){
	    		if(a==0&&c==0){
	    			flag=1;
	    			break;
				}
	    		else{
	    			if(a<c) a++,c--,k+="A";
					else {
						if(c==0){
							c++,a--,k+="C";
						}
						else{
							if(s[i+1]=="BC"){
								a--,c++,k+="C";
							}
							else if(s[i+1]=="AC"){
								a--,c++,k+="C";
							}
							else{
								c--,a++,k+="A";
							}
						}
					}
				}
					
			}
			else if(s[i]=="AB"){
				if(a==0&&b==0){
					flag=1;
					break;
				}
				else{
					if(a<b) a++,b--,k+="A";
					else {
						if(b==0){
							b++,a--,k+="B";
						}
						else{
							if(s[i+1]=="AC"){
								a++,b--,k+="A";
							}
							else b++,a--,k+="B";
						}
					}
				}
			}
			else{
				if(c==0&&b==0){
					flag=1;
					break;
				}
				else{
					if(b<c) b++,c--,k+="B";
					else {
						if(c==0){
							b--,c++,k+="C";
						}
						else {
							if(s[i+1]=="AB"){
								b++,c--,k+="B";
							}
							else b--,c++,k+="C";
						}
					}
				}
			}
		}
		if(flag){
			cout<<"No";
		}
		else{
			cout<<"Yes"<<endl;
			rep(i,0,k.size()){
				cout<<k[i]<<endl;
			}
		}
	}
	else{
		rep(i,0,n){
	    	if(s[i]=="AC"){
	    		if(a==0&&c==0){
	    			flag=1;
	    			break;
				}
	    		else{
	    			if(a<c) a++,c--,k+="A";
					else c++,a--,k+="C";
				}
					
			}
			else if(s[i]=="AB"){
				if(a==0&&b==0){
					flag=1;
					break;
				}
				else{
					if(a<b) a++,b--,k+="A";
					else b++,a--,k+="B";
				}
			}
			else{
				if(c==0&&b==0){
					flag=1;
					break;
				}
				else{
					if(c<b) c++,b--,k+="C";
					else b++,c--,k+="B";
				}
			}
		}
		if(flag){
			cout<<"No";
		}
		else{
			cout<<"Yes"<<endl;
			rep(i,0,k.size()){
				cout<<k[i]<<endl;
			}
		}
	}
	
    return 0;
}


Measured memory_bytes: 34980