#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define ll long long int

ll n,abc[4],a,b,c;
char let[4];
char s[100001][3];
char ans[100001];

void swap(int i,int p,int q){
  if(abc[p]>abc[q]){
      ans[i] = let[q];
      abc[p]--; abc[q]++;}
    else{
      ans[i] = let[p];
      abc[q]--; abc[p]++;}
  return;
}

int part2(){
  int p,q;
  for(ll i=0;i<n;i++){
    p = s[i][0]-'A';
    q = s[i][1]-'A';
    if(abc[p]==0 && abc[q]==0) return 0;
    swap(i,p,q);
  }
  return 1;
}

int part1(){
  int p,q;
  for(ll i=0;i<n;i++){
    p = s[i][0]-'A';
    q = s[i][1]-'A';
    if(abc[p]==0 && abc[q]==0) return 0;
    if(abc[p]==1 && abc[q]==1){
      int pnext = s[i+1][0]-'A';
      int qnext = s[i+1][1]-'A';
      if(p==pnext || p==qnext){
	ans[i] = let[p];
	abc[p]++; abc[q]--;}
      else{
	ans[i] = let[q];
	abc[q]++; abc[p]--;}}
    else{
      swap(i,p,q);}}
  return 1;
}

int main(){
  scanf("%lld%lld%lld%lld",&n,&abc[0],&abc[1],&abc[2]);
  a = abc[0];
  b = abc[1];
  c = abc[2];
  let[0] = 'A';
  let[1] = 'B';
  let[2] = 'C';
  for(int i=0;i<n;i++){
    scanf("%s",s[i]);}

  int kano=1;
  if(a+b+c==2) kano = part1();
  else kano = part2();

  if(kano == 1){
    printf("Yes\n");
    for(ll i=0;i<n;i++){
      printf("%c\n",ans[i]);}
  }
  else{
    printf("No\n");}

  return 0;
}
