#include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <complex>
#include <string.h>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <iomanip>
#include <sys/time.h>
#include <tuple>
#include <random>
using namespace std;

#define endl '\n'
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define UNIQ(v) (v).erase(unique((v).begin(), (v).end()), (v).end())

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef tuple<int, int, int> T;
typedef complex<double> comp;
typedef vector< vector<ld> > matrix;
struct pairhash {
public:
    template<typename T, typename U>
    size_t operator()(const pair<T, U> &x) const {
	size_t seed = hash<T>()(x.first);
	return hash<U>()(x.second) + 0x9e3779b9 + (seed<<6) + (seed>>2);
    }
};
const int inf = 1e9 + 9;
const ll mod = 998244353;
const double eps = 1e-8;
const double pi = acos(-1);

int n, a, b, c;
string s[100100];

void solve() {
    vector<char> vec;
    for (int i = 0; i < n; i++) {
        if (s[i] == "AB") {
            if (a == 0 && b == 0) {
                cout << "No" << endl;
                return;
            }
            if (a == 1 && b == 1 && i < n-1) {
                if (s[i+1] == "BC") {
                    vec.push_back('B');
                    b++;
                    a--;       
                } else {
                    vec.push_back('A');
                    a++;
                    b--;
                }
            } else if (a <= b) {
                vec.push_back('A');
                a++;
                b--;
            } else {
                vec.push_back('B');
                b++;
                a--;
            }
        } else if (s[i] == "BC") {            
            if (b == 0 && c == 0) {
                cout << "No" << endl;
                return;
            }
            if (b == 1 && c == 1 && i < n-1) {
                if (s[i+1] == "AB") {
                    vec.push_back('B');
                    b++;
                    c--;
                } else {
                    vec.push_back('C');
                    c++;
                    b--;
                }
            } else if (b <= c) {
                vec.push_back('B');
                b++;
                c--;
            } else {
                vec.push_back('C');
                c++;
                b--;
            }
        } else {
            if (a == 0 && c == 0) {
                cout << "No" << endl;
                return;
            }
            if (a == 1 && c == 1 && i < n-1) {
                if (s[i+1] == "AB") {
                    vec.push_back('A');
                    a++;
                    c--;
                } else {
                    vec.push_back('C');
                    c++;
                    a--;
                }
            } else if (a <= c) {
                vec.push_back('A');
                a++;
                c--;
            } else {
                vec.push_back('C');
                c++;
                a--;
            }
        }
    }
    cout << "Yes" << endl;
    for (char v : vec) {
        cout << v << endl;
    }
}

void input() {
    cin >> n >> a >> b >> c;
    for (int i = 0; i < n; i++) cin >> s[i];
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);

    input();
    solve();
}


Measured memory_bytes: 5592