#include <bits/stdc++.h>

#define ll long long
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define vll vector<ll>
#define vi vector<int>
#define pi pair<int,int>

using namespace std;

const string str = "ABC";

pi parse(string query)
{
  pi ret;
  if (query=="AB") ret=pi(0,1);
  if (query=="AC") ret=pi(0,2);
  if (query=="BC") ret=pi(1,2);
  return ret;
}

int main()
{
  int N; cin>>N;
  vll v(3);
  rep(i,3) cin>>v[i];
  vector<string> s(N);
  rep(i,N) cin>>s[i];
  if ((v[0]==0&&v[1]==0&&v[2]==0)){
    cout<<"No"<<endl;
    return 0;
  }
  vi ans(N);
  rep(i,N){
    int x,y;
   	tie(x,y) = parse(s[i]);
    if (v[x]==0&&v[y]==0){
      cout<<"No"<<endl;
      return 0;
    }
    if (i<N-1 && v[x]==1&&v[y]==1){
      int nx,ny;
      tie(nx,ny) = parse(s[i+1]);
      if (nx==x||ny==x){
        ans[i] = x;
        v[x]++; v[y]--;
      }else{
        ans[i] = y;
        v[x]--; v[y]++;
      }
    }else{
      if (v[x]>v[y]){
        ans[i] = y;
        v[x]--; v[y]++;
      }else{
        ans[i] = x;
        v[x]++; v[y]--;
      }
    }
  }
  cout<<"Yes"<<endl;
  rep(i,N) cout<<str[ans[i]]<<endl;
  return 0;
}