#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
void *wmem;
char memarr[96000000];
inline int my_getchar_unlocked(){
  static char buf[1048576];
  static int s = 1048576;
  static int e = 1048576;
  if(s == e && e == 1048576){
    e = fread_unlocked(buf, 1, 1048576, stdin);
    s = 0;
  }
  if(s == e){
    return EOF;
  }
  return buf[s++];
}
inline void rd(int &x){
  int k;
  int m=0;
  x=0;
  for(;;){
    k = my_getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = my_getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
inline int rd(char c[]){
  int i;
  int sz = 0;
  for(;;){
    i = my_getchar_unlocked();
    if(i!=' '&&i!='\n'&&i!='\r'&&i!='\t'&&i!=EOF){
      break;
    }
  }
  c[sz++] = i;
  for(;;){
    i = my_getchar_unlocked();
    if(i==' '||i=='\n'||i=='\r'||i=='\t'||i==EOF){
      break;
    }
    c[sz++] = i;
  }
  c[sz]='\0';
  return sz;
}
inline void rd(string &x){
  char *buf = (char *)wmem;
  rd(buf);
  x = buf;
}
struct MY_WRITER{
  char buf[1048576];
  int s;
  int e;
  MY_WRITER(){
    s = 0;
    e = 1048576;
  }
  ~MY_WRITER(){
    if(s){
      fwrite_unlocked(buf, 1, s, stdout);
    }
  }
}
;
MY_WRITER MY_WRITER_VAR;
void my_putchar_unlocked(int a){
  if(MY_WRITER_VAR.s == MY_WRITER_VAR.e){
    fwrite_unlocked(MY_WRITER_VAR.buf, 1, MY_WRITER_VAR.s, stdout);
    MY_WRITER_VAR.s = 0;
  }
  MY_WRITER_VAR.buf[MY_WRITER_VAR.s++] = a;
}
inline void wt_L(char a){
  my_putchar_unlocked(a);
}
inline void wt_L(int x){
  int s=0;
  int m=0;
  char f[10];
  if(x<0){
    m=1;
    x=-x;
  }
  while(x){
    f[s++]=x%10;
    x/=10;
  }
  if(!s){
    f[s++]=0;
  }
  if(m){
    my_putchar_unlocked('-');
  }
  while(s--){
    my_putchar_unlocked(f[s]+'0');
  }
}
inline void wt_L(const char c[]){
  int i=0;
  for(i=0;c[i]!='\0';i++){
    my_putchar_unlocked(c[i]);
  }
}
int N;
int A[3];
string S[100000];
char res[100000];
int dp[100000+1][3][3][3];
int bk_x[100000+1][3][3][3];
int bk_y[100000+1][3][3][3];
int main(){
  wmem = memarr;
  int e[3];
  int x;
  int y;
  rd(N);
  {
    int Lj4PdHRW;
    for(Lj4PdHRW=(0);Lj4PdHRW<(3);Lj4PdHRW++){
      rd(A[Lj4PdHRW]);
    }
  }
  {
    int e98WHCEY;
    for(e98WHCEY=(0);e98WHCEY<(N);e98WHCEY++){
      rd(S[e98WHCEY]);
    }
  }
  if(A[0]+A[1]+A[2]!=2){
    int i;
    for(i=(0);i<(N);i++){
      if(S[i]=="AB"){
        {
          auto WYIGIcGE = (0);
          auto t_ynMSdg = (1);
          x = WYIGIcGE;
          y = t_ynMSdg;
        }
      }
      if(S[i]=="AC"){
        {
          auto KrdatlYV = (0);
          auto ao_dF3pO = (2);
          x = KrdatlYV;
          y = ao_dF3pO;
        }
      }
      if(S[i]=="BC"){
        {
          auto tU__gIr_ = (1);
          auto a2conNHc = (2);
          x = tU__gIr_;
          y = a2conNHc;
        }
      }
      if(A[x] < A[y]){
        swap(x,y);
      }
      if(A[x]==0){
        wt_L("No");
        wt_L('\n');
        return 0;
      }
      A[x]--;
      A[y]++;
      res[i] = 'A' + y;
    }
  }
  else{
    int i;
    dp[0][A[0]][A[1]][A[2]] = 1;
    for(i=(0);i<(N);i++){
      if(S[i]=="AB"){
        {
          auto APIVbQlN = (0);
          auto YREPHmFM = (1);
          x = APIVbQlN;
          y = YREPHmFM;
        }
      }
      if(S[i]=="AC"){
        {
          auto jZyWAPpY = (0);
          auto jbtyPBGc = (2);
          x = jZyWAPpY;
          y = jbtyPBGc;
        }
      }
      if(S[i]=="BC"){
        {
          auto ZIeRIny5 = (1);
          auto iMWUTgY_ = (2);
          x = ZIeRIny5;
          y = iMWUTgY_;
        }
      }
      for(e[0]=0;e[0]<3;e[0]++){
        for(e[1]=0;e[1]<3;e[1]++){
          for(e[2]=0;e[2]<3;e[2]++){
            if(dp[i][e[0]][e[1]][e[2]]){
              if(e[x]){
                e[x]--;
                e[y]++;
                dp[i+1][e[0]][e[1]][e[2]] = 1;
                bk_x[i+1][e[0]][e[1]][e[2]] = x;
                bk_y[i+1][e[0]][e[1]][e[2]] = y;
                e[x]++;
                e[y]--;
              }
              if(e[y]){
                e[x]++;
                e[y]--;
                dp[i+1][e[0]][e[1]][e[2]] = 1;
                bk_x[i+1][e[0]][e[1]][e[2]] = y;
                bk_y[i+1][e[0]][e[1]][e[2]] = x;
                e[x]--;
                e[y]++;
              }
            }
          }
        }
      }
    }
    for(e[0]=0;e[0]<3;e[0]++){
      for(e[1]=0;e[1]<3;e[1]++){
        for(e[2]=0;e[2]<3;e[2]++){
          if(dp[N][e[0]][e[1]][e[2]]){
            goto qSsg05KM;
          }
        }
      }
    }
    qSsg05KM:;
    if(e[0]==3){
      wt_L("No");
      wt_L('\n');
      return 0;
    }
    for(i=(N)-1;i>=(0);i--){
      x = bk_x[i+1][e[0]][e[1]][e[2]];
      y = bk_y[i+1][e[0]][e[1]][e[2]];
      res[i] = 'A' + y;
      e[x]++;
      e[y]--;
    }
  }
  wt_L("Yes");
  wt_L('\n');
  {
    int O3U4gd88;
    for(O3U4gd88=(0);O3U4gd88<(N);O3U4gd88++){
      wt_L(res[O3U4gd88]);
      wt_L('\n');
    }
  }
  return 0;
}
// cLay varsion 20200419-1

// --- original code ---
// int N, A[3];
// string S[1d5];
// char res[1d5];
// int dp[1d5+1][3][3][3], bk_x[1d5+1][3][3][3], bk_y[1d5+1][3][3][3];
// {
//   int e[3], x, y;
//   rd(N,A(3),S(N));
//   if(A[0]+A[1]+A[2]!=2){
//     rep(i,N){
//       if(S[i]=="AB") (x,y) = (0,1);
//       if(S[i]=="AC") (x,y) = (0,2);
//       if(S[i]=="BC") (x,y) = (1,2);
//       if(A[x] < A[y]) swap(x,y);
//       if(A[x]==0) wt("No"), return 0;
//       A[x]--;
//       A[y]++;
//       res[i] = 'A' + y;
//     }
//   } else {
//     dp[0][A[0]][A[1]][A[2]] = 1;
//     rep(i,N){
//       if(S[i]=="AB") (x,y) = (0,1);
//       if(S[i]=="AC") (x,y) = (0,2);
//       if(S[i]=="BC") (x,y) = (1,2);
//       for(e[0]=0;e[0]<3;e[0]++) for(e[1]=0;e[1]<3;e[1]++) for(e[2]=0;e[2]<3;e[2]++)
//       {  if(dp[i][e[0]][e[1]][e[2]]){
//         if(e[x]){
//           e[x]--; e[y]++;
//           dp[i+1][e[0]][e[1]][e[2]] = 1;
//           bk_x[i+1][e[0]][e[1]][e[2]] = x;
//           bk_y[i+1][e[0]][e[1]][e[2]] = y;
//           e[x]++; e[y]--;
//         }
//         if(e[y]){
//           e[x]++; e[y]--;
//           dp[i+1][e[0]][e[1]][e[2]] = 1;
//           bk_x[i+1][e[0]][e[1]][e[2]] = y;
//           bk_y[i+1][e[0]][e[1]][e[2]] = x;
//           e[x]--; e[y]++;
//         }
//       }}
//     }
//     for(e[0]=0;e[0]<3;e[0]++) for(e[1]=0;e[1]<3;e[1]++) for(e[2]=0;e[2]<3;e[2]++) if(dp[N][e[0]][e[1]][e[2]]) break_break_break;
//     if(e[0]==3) wt("No"), return 0;
//     rrep(i,N){
//       x = bk_x[i+1][e[0]][e[1]][e[2]];
//       y = bk_y[i+1][e[0]][e[1]][e[2]];
//       res[i] = 'A' + y;
//       e[x]++; e[y]--;
//     }
//   }
//   wt("Yes");
//   wtLn(res(N));
// }


Measured memory_bytes: 39012