#include <vector>
#include <iostream>
using namespace std;
int main() {
    int n, a[3]; cin >> n >> a[0] >> a[1] >> a[2];
    string s[n]; for (int i = 0; i < n; i++) cin >> s[i];
    vector<char> ans;
    for (int i = 0; i < n; i++) {
        int p = s[i][0]-'A', q = s[i][1]-'A';
        if (a[p] == 0 && a[q] == 0) {
            cout << "No\n";
            return 0;
        } else if (a[p] == 0) {
            ans.push_back(s[i][0]);
            a[p]++;
            a[q]--;
        } else if (a[q] == 0) {
            ans.push_back(s[i][1]);
            a[p]--;
            a[q]++;
        } else {
            if (i == n-1) ans.push_back(s[i][1]);
            else {
                int p1 = s[i+1][0] - 'A', q1 = s[i+1][1] - 'A';
                for (int j = 0; j < 3; j++)
                    if ((p == j || q == j) && (p1 == j || q1 == j)) {
                        ans.push_back('A' + j);
                        a[j]++;
                        a[p+q-j]--;
                        break;
                    }
            }
        }
    }
    cout << "Yes\n";
    for (char c : ans) cout << c << endl;
}
