#include <stdio.h>

int main(void) {

  long n,a,b,c;
  scanf("%ld %ld %ld %ld", &n, &a, &b, &c);
  char s[n][3];
  for (long i = 0; i < n; i++) {
    scanf("%s", s[i]);
  }
  char operation[n];
  for (long i = 0; i < n; i++) {
    if (s[i][0] == 'A' && s[i][1] == 'B') {
      if (a == 0 && b == 0) {
        printf("No\n");
        return 0;
      } else if (b == 0) {
        a--;
        b++;
        operation[i] = 'B';
      } else if (a == 0) {
        a++;
        b--;
        operation[i] = 'A';
      } else if (i != n-1 && s[i+1][0] == 'B' && s[i+1][1] == 'C') {
        a--;
        b++;
        operation[i] = 'B';
      } else {
        a++;
        b--;
        operation[i] = 'A';
      }
    } else if (s[i][0] == 'A' && s[i][1] == 'C') {
      if (a == 0 && c == 0) {
        printf("No\n");
        return 0;
      } else if (c == 0) {
        a--;
        c++;
        operation[i] = 'C';
      } else if (a == 0) {
        a++;
        c--;
        operation[i] = 'A';
      } else if (i != n-1 && s[i+1][0] == 'B' && s[i+1][1] == 'C') {
        a--;
        c++;
        operation[i] = 'C';
      } else {
        a++;
        c--;
        operation[i] = 'A';
      }
    } else {
      if (b == 0 && c == 0) {
        printf("No\n");
        return 0;
      } else if (c == 0) {
        b--;
        c++;
        operation[i] = 'C';
      } else if (b == 0) {
        b++;
        c--;
        operation[i] = 'B';
      } else if (i != n-1 && s[i+1][0] == 'A' && s[i+1][1] == 'C') {
        b--;
        c++;
        operation[i] = 'C';
      } else {
        b++;
        c--;
        operation[i] = 'B';
      }
    }
  }
  printf("Yes\n");
  for (long i = 0; i < n; i++) {
    printf("%c\n", operation[i]);
  }

  return 0;
}