#include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <complex>
#include <valarray>
#include <fstream>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <random>

#define _overload(a, b, c, d, ...) d
#define _rep1(X, A, Y) for (int X = (A); X <= (Y);++X)
#define _rep2(X, Y) for (int X = 0; X < (Y); ++X)
#define rep(...) _overload(__VA_ARGS__, _rep1, _rep2)(__VA_ARGS__)
#define rrep(X, Y) for (int X = (Y-1); X >= 0; --X)
#define all(X) (X).begin(),(X).end()
#define len(X) ((int)(X).size())
#define mod(n, m) (((n)%(m)+(m))%(m))
#define fi first
#define sc second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
const int INFINT = 1 << 30;                          // 1.07x10^ 9
const ll INFLL = 1LL << 60;                          // 1.15x10^18
const double EPS = 1e-10;
const int MOD = 1000000007;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

const int MAX_N = 100000;
int N, A, B, C;
string str[MAX_N];

char ans[MAX_N];

int main() {
    cin >> N;
    cin >> A >> B >> C;
    rep(i, N) cin >> str[i];

    rep(i, N) {
        char ch = -1;
        if (str[i] == "AB") {
            if (A < B) {
                --B;
                ++A;
                ch = 'A';
            } else if (A > B) {
                --A;
                ++B;
                ch = 'B';
            } else {
                if (A != 0) {
                    if (i + 1 == N) {
                        ch = 'A';
                    } else {
                        if (str[i + 1] == "AB") {
                            ch = 'A';
                            ++A;
                            --B;
                        } else if (str[i + 1] == "AC") {
                            ch = 'A';
                            ++A;
                            --B;
                        } else {
                            ch = 'B';
                            --A;
                            ++B;
                        }
                    }
                }
            }
        } else if (str[i] == "AC") {
            if (A < C) {
                --C;
                ++A;
                ch = 'A';
            } else if (A > C) {
                --A;
                ++C;
                ch = 'C';
            } else {
                if (A != 0) {
                    if (i + 1 == N) {
                        ch = 'A';
                    } else {
                        if (str[i + 1] == "AC") {
                            ch = 'A';
                            ++A;
                            --C;
                        } else if (str[i + 1] == "AB") {
                            ch = 'A';
                            ++A;
                            --C;
                        } else {
                            ch = 'C';
                            --A;
                            ++C;
                        }
                    }
                }
            }
        } else {
            if (B < C) {
                --C;
                ++B;
                ch = 'B';
            } else if (B > C) {
                --B;
                ++C;
                ch = 'C';
            } else {
                if (B != 0) {
                    if (i + 1 == N) {
                        ch = 'B';
                    } else {
                        if (str[i + 1] == "BC") {
                            ch = 'B';
                            ++B;
                            --C;
                        } else if (str[i + 1] == "AB") {
                            ch = 'B';
                            ++B;
                            --C;
                        } else {
                            ch = 'C';
                            --B;
                            ++C;
                        }
                    }
                }
            }
        }
        if (ch < 0) {
            cout << "No" << endl;
            return 0;
        }
        ans[i] = ch;
    }

    cout << "Yes" << endl;
    rep(i, N) {
        cout << ans[i] << endl;
    }

    return 0;
}


Measured memory_bytes: 6860