#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
#define int long long
#define ull unsigned long long
#define ld long double
#define rep(a) rep1(i,a)
#define rep1(i,a) rep2(i,0,a)
#define rep2(i,b,a) for(int i=(b); i<((int)(a)); i++)
#define rep3(i,b,a) for(int i=(b); i>=((int)(a)); i--)
#define all(a) a.begin(),a.end()
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define sz(a) ((int)a.size())
#define pow2(x) (1ll<<(x))
#define ceiling(a,b) (((a)+(b)-1)/(b))
#define print0(a) cout << (a) << ' '
#define print1(a) cout << (a) << '\n'
#define print2(a,b) cout << (a) << ' ',print1(b)
#define print3(a,b,c) cout << (a) << ' ',print2(b,c)
#define print4(a,b,c,d) cout << (a) << ' ',print3(b,c,d)
#ifdef i_am_noob
#define debug(a) print2(#a,a)
#else
#define debug(a) 
#endif
#define ordered_set tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
 
using namespace std;
using namespace __gnu_pbds;
 
const int Mod=1000000007,Mod2=998244353;
const int MOD=Mod2;
 
inline int add(int a, int b){return (a+b>=MOD?a+b-MOD:a+b);}
inline int sub(int a, int b){return (a+MOD-b>=MOD?a-b:a+MOD-b);}
int Pow(int a, int b){
	if(!b) return 1;
	int tmp=Pow(a*a%MOD,b>>1);
	return (b&1?tmp*a%MOD:tmp);
}
inline int inverse(int n){return Pow(n,MOD-2);}
 
const int maxn=100005;
//i_am_noob
int n,a[3],ans[maxn],b[3],dp2[maxn][27],x,y;
bool dp[maxn][27];
string str,str1[maxn];

pii f(string str2){
	if(str2=="AB") return mp(0,1);
	if(str2=="AC") return mp(0,2);
	if(str2=="BC") return mp(1,2);
}

signed main(){
	ios_base::sync_with_stdio(0),cin.tie(0);
	cin >> n >> a[0] >> a[1] >> a[2];
	if(a[0]+a[1]+a[2]>=3){
		cin >> str;
		if(a[f(str).first]==0&&a[f(str).second]==0){
			print1("No");
			return 0;
		}
		if(a[f(str).first]>a[f(str).second]){
			a[f(str).first]--;
			a[f(str).second]++;
			ans[0]=f(str).second;
		}
		else{
			a[f(str).first]++;
			a[f(str).second]--;
			ans[0]=f(str).first;
		}
		rep(n-1){
			cin >> str;
			if(a[f(str).first]>a[f(str).second]){
				a[f(str).first]--;
				a[f(str).second]++;
				ans[i+1]=f(str).second;
			}
			else{
				a[f(str).first]++;
				a[f(str).second]--;
				ans[i+1]=f(str).first;
			}
		}
		print1("Yes");
		rep(n) print1(char('A'+ans[i]));
		return 0;
	}
	rep(n) cin >> str1[i];
	rep(n+1) rep1(j,27) dp[i][j]=false;
	rep(27) dp[n][i]=true;
	rep3(i,n-1,0) rep1(j,27){
		if(!dp[i+1][j]) continue;
		b[0]=j/9%3;
		b[1]=j/3%3;
		b[2]=j%3;
		if(b[0]+b[1]+b[2]==a[0]+a[1]+a[2]){
			
		if(b[f(str1[i]).first]>0){
			b[f(str1[i]).first]--;
			b[f(str1[i]).second]++;
			if(0<=b[0]&&b[0]<=2&&0<=b[1]&&b[1]<=2&&0<=b[2]&&b[2]<=2){
				dp[i][9*b[0]+3*b[1]+b[2]]=true;
				dp2[i][9*b[0]+3*b[1]+b[2]]=f(str1[i]).first;
			}
			b[f(str1[i]).first]++;
			b[f(str1[i]).second]--;
		}
		if(b[f(str1[i]).second]>0){
			b[f(str1[i]).first]++;
			b[f(str1[i]).second]--;
			if(0<=b[0]&&b[0]<=2&&0<=b[1]&&b[1]<=2&&0<=b[2]&&b[2]<=2){
				dp[i][9*b[0]+3*b[1]+b[2]]=true;
				dp2[i][9*b[0]+3*b[1]+b[2]]=f(str1[i]).second;
			}
		}
		
		}
	}
	/*
	rep(n) rep1(j,27){
		b[0]=j/9%3;
		b[1]=j/3%3;
		b[2]=j%3;
		if(b[0]+b[1]+b[2]==a[0]+a[1]+a[2]){
			print0(i);
			print0(j);
			print4(b[0],b[1],b[2],dp[i][j]);
		}
	}
	*/
	print1(dp[0][9*a[0]+3*a[1]+a[2]]?"Yes":"No");
	if(dp[0][9*a[0]+3*a[1]+a[2]]){
		rep(n){
			print1(char('A'+dp2[i][9*a[0]+3*a[1]+a[2]]));
			x=dp2[i][9*a[0]+3*a[1]+a[2]];
			y=f(str1[i]).first+f(str1[i]).second-dp2[i][9*a[0]+3*a[1]+a[2]];
			a[x]++;
			a[y]--;
		}
	}
	return 0;
}

Measured memory_bytes: 30476