use std::io::{stdin, Read};

macro_rules! parse {
    ($it: ident ) => {};
    ($it: ident, ) => {};
    ($it: ident, $var:ident : $t:tt $($r:tt)*) => {
        let $var = parse_val!($it, $t);
        parse!($it $($r)*);
    };
    ($it: ident, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = parse_val!($it, $t);
        parse!($it $($r)*);
    };
}

macro_rules! parse_val {
    ($it: ident, [$t:tt; $len:expr]) => {
        (0..$len).map(|_| parse_val!($it, $t)).collect::<Vec<_>>();
    };
    ($it: ident, ($($t: ty),*)) => {
        ($(parse_val!($it, $t)),*)
    };
    ($it: ident, $t: ty) => {
        $it.next().unwrap().parse::<$t>().unwrap()
    };
}

fn solve(s: &str) {
    let mut it = s.split_whitespace();
    parse!(it, mut n: usize, a: usize, b: usize, c: usize);
    let mut s = [a, b, c];
    let abc = ["A", "B", "C"];
    let mut ret = vec![];
    let mut take = || match it.next().unwrap() {
        "AB" => (0, 1),
        "BC" => (1, 2),
        "AC" => (2, 0),
        _ => unreachable!(),
    };
    let m = s[0] + s[1] + s[2];
    let check = |s: [usize; 3]| assert!(s[0] <= m && s[1] <= m && s[2] <= m);
    while n > 0 {
        if s == [0, 1, 1] || s == [1, 1, 0] || s == [1, 0, 1] {
            break;
        }
        let (i, j) = take();
        n -= 1;
        if s[i] == s[j] && s[i] == 0 {
            println!("No");
            return;
        }
        if s[i] > s[j] {
            s[i] -= 1;
            s[j] += 1;
            ret.push(j);
        } else {
            s[j] -= 1;
            s[i] += 1;
            ret.push(i);
        }
        check(s);
    }

    while n > 1 {
        assert!(s == [0, 1, 1] || s == [1, 1, 0] || s == [1, 0, 1]);
        let (i, j) = take();
        n -= 1;
        if s[i] == 1 && s[j] == 1 {
            let (k, l) = take();
            n -= 1;
            if k != i && k != j {
                if i == l {
                    ret.push(i);
                    ret.push(k);
                    s[i] = 1;
                    s[j] = 0;
                    s[k] = 1;
                } else {
                    ret.push(j);
                    ret.push(k);
                    s[i] = 0;
                    s[j] = 1;
                    s[k] = 1;
                }
            } else if l != i && l != j {
                if i == k {
                    ret.push(i);
                    ret.push(l);
                    s[i] = 1;
                    s[j] = 0;
                    s[l] = 1;
                } else {
                    ret.push(j);
                    ret.push(l);
                    s[i] = 0;
                    s[j] = 1;
                    s[l] = 1;
                }
            } else {
                assert_eq!((i, j), (k, l));
                ret.push(i);
                ret.push(j);
            }
        } else {
            if s[i] > s[j] {
                s[i] -= 1;
                s[j] += 1;
                ret.push(j);
            } else {
                s[j] -= 1;
                s[i] += 1;
                ret.push(i);
            }
        }
        check(s);
    }

    if n == 1 {
        let (i, j) = take();
        if s[i] > s[j] {
            s[i] -= 1;
            s[j] += 1;
            ret.push(j);
        } else {
            s[j] -= 1;
            s[i] += 1;
            ret.push(i);
        }
        n -= 1;
    } else if n > 1 {
        unreachable!()
    }

    println!("Yes");
    for r in ret {
        println!("{}", abc[r]);
    }
}

fn main() {
    let mut s = String::new();
    stdin().read_to_string(&mut s).unwrap();
    solve(&s);
}

#[cfg(test)]
mod tests {
    use super::*;
    #[test]
    fn test_input() {
        let s = "
        ";
        solve(s);
    }
}


Measured memory_bytes: 3300