/*
   Created by Rahul Goel.
   */
/*******************************************************************************/
#include <iostream>
#include <vector>
#include <numeric>
#include <cstring>
#include <string>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
/*******************************************************************************/
using namespace std;
using ll = long long;
using ld = long double;
const ll mod = 1000000007;
const int INF = 1e9;
const ll LINF = 1e18;
/*******************************************************************************/
/*
   .-.. . -. -.- .- / .. ... / .-.. --- ...- . -.-.--
   */
/* For PBDS */
/*Two new methods X.order_of_key() and X.find_by_order()*/
/*
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
*/

/*******************************************************************************/
ll mod_sum() { return 0LL; }
template<typename T, typename... Args>
T mod_sum(T a, Args... args) { return ((a + mod_sum(args...))%mod + mod)%mod; }

ll mod_prod() { return 1LL; }
template<typename T, typename... Args>
T mod_prod(T a, Args... args) { return (a*mod_prod(args...))%mod; }
/*******************************************************************************/
using pii = pair < ll, ll >;
using vi = vector < ll >;
using vb = vector < bool >;
using vvi = vector < vector < ll > >;
using vvb = vector < vector < bool > >;
using vpii = vector < pii >;
using vvpii = vector < vector < pii > >;
#ifdef ONLINE_JUDGE
#define endl '\n'
#endif
#define fastio          ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define all(c)          (c).begin(), (c).end()
#define present(c,x)    ((c).find(x) != (c).end())
#define cpresent(c,x)   (find(all(c),x) != (c).end())
#define uniq(c)         (c).resize(distance((c).begin(), unique(all(c))))
#define min_pq(t)       priority_queue < t, vector < t >, greater < t > >
#define max_pq(t)       priority_queue < t >
#define pb              push_back
#define ff              first
#define ss              second
/*******************************************************************************/

/*
   Code begins after this.
   */


ll solve(){
    ll n, a, b, c;
    cin >> n >> a >> b >> c;

    vector < string > vec(n);
    for(string &str : vec)
        cin >> str;

    if(a + b + c == 0){
        cout << "No" << endl;
        return 0;
    }

    if(a + b + c == 1){
        vector < char > ans;
        for(string &str : vec){
            if(str == "AB"){
                if(a + b == 0){
                    cout << "No" << endl;
                    return 0;
                }
                else{
                    if(!a)
                        ans.pb('A');
                    else
                        ans.pb('B');
                    swap(a, b);
                }
            }
            else if(str == "AC"){
                if(a + c == 0){
                    cout << "No" << endl;
                    return 0;
                }
                else{
                    if(!a)
                        ans.pb('A');
                    else
                        ans.pb('C');
                    swap(a, c);
                }
            }
            else{
                if(b + c == 0){
                    cout << "No" << endl;
                    return 0;
                }
                else{
                    if(!b)
                        ans.pb('B');
                    else
                        ans.pb('C');
                    swap(b, c);
                }
            }
        }
        cout << "Yes" << endl;
        for(char x : ans)
            cout << x << endl;
        return 0;
    }

    {
        if(vec.front() == "AB"){
            if(a + b == 0){
                cout << "No" << endl;
                return 0;
            }
        }
        else if(vec.front() == "AC"){
            if(a + c == 0){
                cout << "No" << endl;
                return 0;
            }
        }
        else{
            if(b + c == 0){
                cout << "No" << endl;
                return 0;
            }
        }
    }

    cout << "Yes" << endl;
    for(ll i = 0; i < (ll)vec.size(); i++){
        string str = vec[i];
        if(str == "AB"){
            if(a == 0)
                a++, b--, cout << "A" << endl;
            else if(b == 0)
                b++, a--, cout << "B" << endl;
            else if(a + b + c == 2 && i + 1 < (ll)vec.size() && vec[i + 1] != vec[i]){
                if(vec[i + 1] == "AC"){
                    a++, b--, cout << "A" << endl;
                }
                else{
                    b++, a--, cout << "B" << endl;
                }
            }
            else if(b < a)
                b++, a--, cout << "B" << endl;
            else
                a++, b--, cout << "A" << endl;
        }
        else if(str == "AC"){
            if(a == 0)
                a++, c--, cout << "A" << endl;
            else if(c == 0)
                c++, a--, cout << "C" << endl;
            else if(a + b + c == 2 && i + 1 < (ll)vec.size() && vec[i + 1] != vec[i]){
                if(vec[i + 1] == "BC"){
                    c++, a--, cout << "C" << endl;
                }
                else{
                    a++, c--, cout << "A" << endl;
                }
            }
            else if(c < a)
                c++, a--, cout << "C" << endl;
            else
                a++, c--, cout << "A" << endl;
        }
        else{
            if(b == 0)
                b++, c--, cout << "B" << endl;
            else if(c == 0)
                c++, b--, cout << "C" << endl;
            else if(a + b + c == 2 && i + 1 < (ll)vec.size() && vec[i + 1] != vec[i]){
                if(vec[i + 1] == "AB"){
                    b++, c--, cout << "B" << endl;
                }
                else{
                    c++, b--, cout << "C" << endl;
                }
            }
            else if(c < b)
                c++, b--, cout << "C" << endl;
            else
                b++, c--, cout << "B" << endl;
        }
    }


    return 0;
}


signed main(){
    fastio;

    ll t = 1;
    while(t--)
        solve();

    return 0;
}

/*******************************************************************************/
// Remeber - In a custom comparator cmp(a, b) a==b must always return to false.



Measured memory_bytes: 6688