#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)
ll N;
const ll MAX_N=1e5;
string S[MAX_N];
ll ABC[3];
char ope[MAX_N+1];
ll ctoi(char c){
	return c-'A';
}
bool dfs(ll i){
	if(i==N){
		return true;
	}
	if(ABC[ctoi(S[i][0])]>0){
		
		ABC[ctoi(S[i][0])]--;
		ABC[ctoi(S[i][1])]++;
		ope[i]=S[i][1];
		if(dfs(i+1)){
			return true;
		}
		ABC[ctoi(S[i][0])]++;
		ABC[ctoi(S[i][1])]--;
		

	}
	if(ABC[ctoi(S[i][1])]>0){
		
		ABC[ctoi(S[i][1])]--;
		ABC[ctoi(S[i][0])]++;
		ope[i]=S[i][0];
		if(dfs(i+1)){
			return true;
		}
		ABC[ctoi(S[i][1])]++;
		ABC[ctoi(S[i][0])]--;
		
		
	}
	return false;
}

int main(){
	cin.tie(0);
	cin.sync_with_stdio(false);
	cin>>N;
	REP(i,3)cin>>ABC[i];
	REP(i,N)cin>>S[i];
	if(dfs(0)){
		cout<<"Yes"<<endl;
		REP(i,N){
			cout<<ope[i]<<endl;
		}
	}else{
		cout<<"No"<<endl;
	}
}
