function F166(_input) {
    var lines = _input.split("\n");
    var first = lines.shift().split(' ').map(item => item*1);
    var n = first.shift();
    var num = {
        'A': first[0],
        'B': first[1],
        'C': first[2],
    };
    var route = [];
    lines.push('AC');

    for (let i = 0; i < n; i++) {
        const key1 = lines[i][0];
        const key2 = lines[i][1];

        if (!num[key1]&&!num[key2]) {
            console.log('NO');
            return;
        }

        if (!num[key1]) {
            num[key1]++;
            num[key2]--;
            route.push(key1);
            continue;
        }

        if (!num[key2]) {
            num[key1]--;
            num[key2]++;
            route.push(key2);
            continue;
        }

        const nKey1 = lines[i+1][0];
        const nKey2 = lines[i+1][1];

        if (key1 === nKey1 || key1 === nKey2) {
            num[key1]++;
            num[key2]--;
            route.push(key1);
        } else {
            num[key1]--;
            num[key2]++;
            route.push(key2);
        }
    }

    console.log('YES');
    route.map(item => console.log((item)));
}
F166(require("fs").readFileSync("/dev/stdin", "utf8"));
