#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define sz(x) (int)(x).size()
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define EPS (1e-10)
#define equals(a, b) (fabs((a)-(b)) < EPS)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef set<int> S;
typedef queue<int> Q;
typedef queue<P> QP;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MOD = 1000000007;

void printCmd(vi &ans) {
  cout << "Yes" << endl;
  for(int c:ans) {
    string s = "";
    s += c+'A';
    cout << s << endl;
  }
}
  
int main() {
  int N;
  cin >> N;
  vl st(3);
  rep(i,3) {
    cin >> st[i];
  }
  vi cmd(N);
  rep(i,N) {
    string s;
    cin >> s;
    if(s=="AB") {
      cmd[i]=0;
    } else if(s=="BC") {
      cmd[i]=1;
    } else {
      cmd[i]=2;
    }
  }
  vi ans;
  bool ok=true;
  vl now(st);
  auto calc = [&](int x,int y,int i) {
    if(now[x]>st[x]&&st[x]>0) {
      ans.push_back(y);
      now[x]--;
      now[y]++;
    } else if(now[y]>st[y]&&st[y]>0) {
      ans.push_back(x);
      now[y]--;
      now[x]++;
    } else {
      if(i==N-1) {
        if(now[y]>0) {
          ans.push_back(x);
          now[y]--;
          now[x]++;
        } else if(now[x]>0) {
          ans.push_back(y);
          now[x]--;
          now[y]++;
        } else {
          ok=false;
        }
      } else {
        if(now[x]==0) {
          ans.push_back(x);
          now[x]++;
          now[y]--;
          if(now[y]<0) {
            ok=false;
          }
        } else if(now[y]==0) {
          ans.push_back(y);
          now[y]++;
          now[x]--;
          if(now[x]<0) {
            ok=false;
          }
        } else if(cmd[i+1]==y||cmd[i+1]==(y+2)%3) {
          ans.push_back(y);
          now[x]--;
          now[y]++;
          if(now[x]<0) {
            ok=false;
          }
        } else {
          ans.push_back(x);
          now[y]--;
          now[x]++;
          if(now[y]<0) {
            ok=false;
          }
        }
      }
    }
  };
  
  rep(i,N) {
    if(!ok) break;
    switch (cmd[i])
    {
    case 0:
      calc(0,1,i);
      break;
    case 1:
      calc(1,2,i);
      break;
    case 2:
      calc(2,0,i);
      break;
    }
  }
  if(!ok) {
    cout << "No" << endl;
    return 0;
  }
  printCmd(ans);
  return 0;
}