#include <iostream>
#include <vector>
#include <algorithm>
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
#define REP(i, n) for(int i = 1; i < (int)(n); ++i)
using namespace std;

int N;
vector<int> A(3);
vector<char> S(200000), ans(100000);
bool searched = false;

void dfs(int n) {
    if (A[0] < 0 || A[1] < 0 || A[2] < 0) return;
    if (searched) return;
    if (n == N) {
        cout << "Yes" << "\n";
        rep(i, N) cout << ans[i] << "\n";
        searched = true;
        return;
    }
    
    ++A[S[2 * n] - 'A'];
    --A[S[2 * n + 1] - 'A'];
    ans[n] = S[2 * n];
    dfs(n + 1);
    --A[S[2 * n] - 'A'];
    ++A[S[2 * n + 1] - 'A'];
    
    if (searched) return;
    --A[S[2 * n] - 'A'];
    ++A[S[2 * n + 1] - 'A'];
    ans[n] = S[2 * n + 1];
    dfs(n + 1);
    ++A[S[2 * n] - 'A'];
    --A[S[2 * n + 1] - 'A'];
    return;
}

int main() {
    cin >> N >> A[0] >> A[1] >> A[2];
    rep(i, 2 * N) cin >> S[i];
    dfs(0);
    if (!searched) cout << "No" << "\n";
    return 0;
}
