#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define repi(i,a,b) for(ll i=(a);i<(b);++i)
#define rep(i,a) repi(i,0,a)
#define repdi(i,a,b) for(ll i=(a)-1;i>=(b);--i)
#define repd(i,a) repdi(i,a,0)
#define itr(it,a) for( auto it = (a).begin(); it != (a).end(); ++it )
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()

using ll = long long;
using P = std::pair<ll, ll>;

constexpr ll INF = 1ll<<60;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

template<class S, class T>
std::ostream& operator<< ( std::ostream& out, const std::pair<S,T>& a )
{ std::cout << '(' << a.first << ", " << a.second << ')'; return out; }

template<class T>
std::ostream &operator<< ( std::ostream& out, const std::vector<T>& a )
{ std::cout << '['; rep( i, a.size() ){ std::cout << a[i]; if( i != a.size()-1 ) std::cout << ", "; } std::cout << ']'; return out; }

ll N, cnt[5];
std::string s[100010];

int main()
{
  std::cin >> N >> cnt[0] >> cnt[1] >> cnt[2];

  rep( i, N )
    std::cin >> s[i];

  ll S = cnt[0]+cnt[1]+cnt[2];

  if( S == 0 )
    puts("No");
  else if( S == 1 )
  {
    std::vector<char> vs;

    rep( i, N )
    {
      ll a = s[i][0]-'A', b = s[i][1]-'A';

      if( !cnt[a] && !cnt[b] )
      {
        puts("No");

        return 0;
      }

      if( !cnt[a] )
      {
        ++cnt[a];
        --cnt[b];

        vs.emplace_back( s[i][0] );
      }
      else if( !cnt[b] )
      {
        --cnt[a];
        ++cnt[b];

        vs.emplace_back( s[i][1] );
      }
    }

    puts("Yes");

    rep( i, vs.size() )
      std::cout << vs[i] << std::endl;
  }
  else
  {
    rep( i, N )
    {
      ll a = s[i][0]-'A', b = s[i][1]-'A';

      //printf( "%lld: %lld, %lld, %lld\n", i, cnt[0], cnt[1], cnt[2] );

      if( !i && !cnt[a] && !cnt[b] )
      {
        puts("No");

        return 0;
      }

      if( !i )
        puts("Yes");

      if( !cnt[a] && cnt[b] > 0 )
      {
        ++cnt[a];
        --cnt[b];

        std::cout << s[i][0] << std::endl;

        continue;
      }

      if( !cnt[b] && cnt[a] > 0 )
      {
        --cnt[a];
        ++cnt[b];

        std::cout << s[i][1] << std::endl;

        continue;
      }

      if( S == 2 && cnt[a] == 1 && cnt[b] == 1 && i < N-1 && s[i] != s[i+1] )
      {
        std::set<char> S;
        S.emplace( s[i][0] );
        S.emplace( s[i][1] );

        ll idx, idx2;

        rep( j, 2 ) if( S.count( s[i+1][j] ) )
          idx = s[i+1][j]-'A';

        if( idx != a )
          idx2 = a;
        else
          idx2 = b;

        ++cnt[idx];
        --cnt[idx2];

        std::cout << char(idx+'A') << std::endl;

        continue;
      }

      if( cnt[a] < cnt[b] )
      {
        ++cnt[a];
        --cnt[b];

        std::cout << s[i][0] << std::endl;

        continue;
      }
      else {
        --cnt[a];
        ++cnt[b];

        std::cout << s[i][1] << std::endl;

        continue;
      }
    }
  }

  return 0;
}

Measured memory_bytes: 5560