#include<cstdio>

int n, a, b, c;
char ans[100005];
bool dp[100005][3][3][3];
char bt[100005][3][3][3][2];

int main() {
  scanf("%d %d %d %d", &n, &a, &b, &c);
  if (a + b + c == 2) {
    dp[0][a][b][c] = true;
    for (int i = 0; i < n; i++) {
      char s[10];
      scanf("%s", s);
      for (int x = 0; x <= 2; x++) {
        for (int y = 0; y <= 2; y++) {
          for (int z = 0; z <= 2; z++) {
            if (!dp[i][x][y][z]) {
              continue;
            }
            if (s[1] == 'B') {
              // AB
              if (x) {
                dp[i+1][x-1][y+1][z] = true;
                bt[i+1][x-1][y+1][z][0] = 'A';
                bt[i+1][x-1][y+1][z][1] = 'B';
              }
              if (y) {
                dp[i+1][x+1][y-1][z] = true;
                bt[i+1][x+1][y-1][z][0] = 'B';
                bt[i+1][x+1][y-1][z][1] = 'A';
              }
            } else if (s[0] == 'A') {
              // AC
              if (x) {
                dp[i+1][x-1][y][z+1] = true;
                bt[i+1][x-1][y][z+1][0] = 'A';
                bt[i+1][x-1][y][z+1][1] = 'C';
              }
              if (z) {
                dp[i+1][x+1][y][z-1] = true;
                bt[i+1][x+1][y][z-1][0] = 'C';
                bt[i+1][x+1][y][z-1][1] = 'A';
              }
            } else {
              // BC
              if (y) {
                dp[i+1][x][y-1][z+1] = true;
                bt[i+1][x][y-1][z+1][0] = 'B';
                bt[i+1][x][y-1][z+1][1] = 'C';
              }
              if (z) {
                dp[i+1][x][y+1][z-1] = true;
                bt[i+1][x][y+1][z-1][0] = 'C';
                bt[i+1][x][y+1][z-1][1] = 'B';
              }
            }
          }
        }
      }
    }
    bool ok = false;
    for (int x = 0; x <= 2; x++) {
      for (int y = 0; y <= 2; y++) {
        for (int z = 0; z <= 2; z++) {
          if (ok) {
            continue;
          }
          if (dp[n][x][y][z]) {
            ok = true;
            int a = x;
            int b = y;
            int c = z;
            for (int i = n-1; i >= 0; i--) {
              int na = a;
              int nb = b;
              int nc = c;
              switch (bt[i+1][a][b][c][0]) {
                case 'A':
                  ++na;
                  break;
                case 'B':
                  ++nb;
                  break;
                case 'C':
                  ++nc;
                  break;
                default:
                  return -1;
              }
              ans[i] = bt[i+1][a][b][c][1];
              switch (bt[i+1][a][b][c][1]) {
                case 'A':
                  --na;
                  break;
                case 'B':
                  --nb;
                  break;
                case 'C':
                  --nc;
                  break;
                default:
                  return -1;
              }
              a = na;
              b = nb;
              c = nc;
            }
            printf("Yes\n");
            for (int i = 0; i < n; i++) {
              printf("%c\n", ans[i]);
            }
          }
        }
      }
    }
    if (!ok) {
      printf("No\n");
    }
  } else {
    bool ok = true;
    for (int i = 0; i < n; i++) {
      char s[10];
      scanf("%s", s);
      if (s[1] == 'B') {
        // AB
        if (a < b) {
          ans[i] = 'A';
          ++a;
          --b;
        } else {
          ans[i] = 'B';
          ++b;
          --a;
        }
      } else if (s[0] == 'A') {
        // AC
        if (a < c) {
          ans[i] = 'A';
          ++a;
          --c;
        } else {
          ans[i] = 'C';
          ++c;
          --a;
        }
      } else {
        // BC
        if (b < c) {
          ans[i] = 'B';
          ++b;
          --c;
        } else {
          ans[i] = 'C';
          ++c;
          --b;
        }
      }
      if (a < 0 || b < 0 || c < 0) {
        ok = false;
      }
    }
    if (ok) {
      printf("Yes\n");
      for (int i = 0; i < n; i++) {
        printf("%c\n", ans[i]);
      }
    } else {
      printf("No\n");
    }
  }
}


Measured memory_bytes: 9744