#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define rep(i, n) for(int i=0;i<n;++i)
#define rrep(i, n) for(int i=n;i>=0;--i)
const int inf=1e9+7;
const ll mod=1e9+7;
const ll mod1=998244353;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  ll N, A, B, C;
  cin>>N>>A>>B>>C;
  string S[N];
  for(int i=0;i<N;++i) cin>>S[i];
  char ans[N];
  bool can = true;
  for(int i=0;i<N;++i) {
    if(S[i]=="AB") {
      if(A+B>2 || A+B==1) {
        if(A>B) {
          ans[i] = 'B';
          A--;
          B++;
        }
        else {
          ans[i] = 'A';
          B--;
          A++;
        }
      }
      else if(A+B==2) {
        if(A>B) {
          A--;
          B++;
          ans[i] = 'B';
        }
        else if(B>A) {
          B--;
          A++;
          ans[i] = 'A';
        }
        else {
          if(i==N-1) {
            ans[i] = 'A';
            continue;
          }
          if(S[i+1]=="AB") {
            ans[i] = 'B';
            A--;
            B++;
          }
          else if(S[i+1]=="BC") {
            ans[i] = 'B';
            A--;
            B++;
          }
          else {
            ans[i] = 'A';
            A++;
            B--;
          }
        }
      }
      else can = false;
    }
    else if(S[i]=="BC") {
      if(B+C>2 || B+C==1) {
        if(B>C) {
          ans[i] = 'C';
          B--;
          C++;
        }
        else {
          ans[i] = 'B';
          C--;
          B++;
        }
      }
      else if(B+C==2) {
        if(B>C) {
          B--;
          C++;
          ans[i] = 'C';
        }
        else if(C>B) {
          C--;
          B++;
          ans[i] = 'B';
        }
        else {
          if(i==N-1) {
            ans[i] = 'B';
            continue;
          }
          if(S[i+1]=="AB") {
            ans[i] = 'B';
            C--;
            B++;
          }
          else if(S[i+1]=="BC") {
            ans[i] = 'B';
            B++;
            C--;
          }
          else {
            ans[i] = 'C';
            C++;
            B--;
          }
        }
      }
      else can = false;
    }
    else {
      if(C+A>2 || C+A==1) {
        if(C>A) {
          ans[i] = 'A';
          C--;
          A++;
        }
        else {
          ans[i] = 'C';
          A--;
          C++;
        }
      }
      else if(C+A==2) {
        if(C>A) {
          ans[i] = 'A';
          C--;
          A++;
        }
        else if(C<A) {
          ans[i] = 'C';
          A--;
          C++;
        }
        else {
          if(i==N-1) {
            ans[i] = 'C';
            continue;
          }
          if(S[i+1]=="AB") {
            ans[i] = 'A';
            C--;
            A++;
          }
          else if(S[i+1]=="BC") {
            ans[i] = 'C';
            C++;
            A--;
          }
          else {
            ans[i] = 'C';
            C++;
            A--;
          }
        }
      }
      else can = false;
    }
  }
  if(can) {
    cout<<"Yes"<<endl;
    for(int i=0;i<N;++i) cout<<ans[i]<<endl;
  }
  else cout<<"No"<<endl;
}



Measured memory_bytes: 6828