#![allow(dead_code)]
use crate::extra::VecExtra;
use crate::misc::{arr, base, join};
use crate::scanner::Scanner;
use std::collections::HashSet;
fn main() {
    let mut scan = Scanner::new();
    let n = scan.read::<usize>();
    let mut a = scan.readn::<i64>(3);
    let s = arr(n, || scan.chars().map(|c| base(c, 'A')));
    if a.sum::<i64>() == 0 {
        println!("No");
    } else if a.sum::<i64>() == 1 {
        let mut ret = vec![];
        for i in 0..n {
            let c = if a[s[i][0]] < a[s[i][1]] {
                s[i][0]
            } else {
                s[i][1]
            };
            a[c] += 1;
            if a[other(&s[i], c)] == 0 {
                println!("No");
                return;
            }
            a[other(&s[i], c)] -= 1;
            ret.push((b'A' + c as u8) as char);
        }
        println!("Yes");
        println!("{}", join(&ret, "\n"));
    } else {
        if a[s[0][0]] + a[s[0][1]] == 0 {
            println!("No");
        } else {
            println!("Yes");
            let mut ret = vec![];
            for i in 0..n {
                if a[s[i][0]] == 0 {
                    a[s[i][0]] += 1;
                    a[s[i][1]] -= 1;
                    ret.push((b'A' + s[i][0] as u8) as char);
                } else if a[s[i][1]] == 0 {
                    a[s[i][1]] += 1;
                    a[s[i][0]] -= 1;
                    ret.push((b'A' + s[i][1] as u8) as char);
                } else if a.sum::<i64>() == 2
                    && a[s[i][0]] == 1
                    && a[s[i][1]] == 1
                    && i + 1 < n
                    && s[i] != s[i + 1]
                {
                    let r = (&s[i].to::<HashSet<_>>() & &s[i + 1].to::<HashSet<_>>())
                        .into_iter()
                        .next()
                        .unwrap();
                    a[r] += 1;
                    a[other(&s[i], r)] -= 1;
                    ret.push((b'A' + r as u8) as char);
                } else {
                    let c = if a[s[i][0]] < a[s[i][1]] {
                        s[i][0]
                    } else {
                        s[i][1]
                    };
                    a[c] += 1;
                    a[other(&s[i], c)] -= 1;
                    ret.push((b'A' + c as u8) as char);
                }
            }
            println!("{}", join(&ret, "\n"));
        }
    }
}
fn other(s: &Vec<usize>, i: usize) -> usize {
    if s[0] == i {
        s[1]
    } else {
        s[0]
    }
}
mod misc {
    use crate::tiny_num_traits::ZeroOne;
    use std::collections::{BTreeSet, HashMap};
    use std::ops::{Add, Div, Mul, Sub};
    pub const CONST_1E9_7: i64 = 1_000_000_007;
    pub fn arr<'a, S, T>(n: usize, mut f: S) -> Vec<T>
    where
        S: FnMut() -> T + 'a,
    {
        (0..n).map(|_| f()).collect::<Vec<T>>()
    }
    pub fn adjacent4(
        y: usize,
        x: usize,
        h: usize,
        w: usize,
    ) -> impl Iterator<Item = (usize, usize)> {
        const DYDX: [(isize, isize); 4] = [(-1, 0), (1, 0), (0, -1), (0, 1)];
        DYDX.iter().filter_map(move |&(dy, dx)| {
            let ny = y as isize + dy;
            let nx = x as isize + dx;
            if nx >= 0 && nx < w as isize && ny >= 0 && ny < h as isize {
                Some((ny as usize, nx as usize))
            } else {
                None
            }
        })
    }
    pub fn adjacent8(
        y: usize,
        x: usize,
        h: usize,
        w: usize,
    ) -> impl Iterator<Item = (usize, usize)> {
        const DYDX: [(isize, isize); 8] = [
            (-1, 0),
            (1, 0),
            (0, -1),
            (0, 1),
            (-1, -1),
            (-1, 1),
            (1, -1),
            (1, 1),
        ];
        DYDX.iter().filter_map(move |&(dy, dx)| {
            let ny = y as isize + dy;
            let nx = x as isize + dx;
            if nx >= 0 && nx < w as isize && ny >= 0 && ny < h as isize {
                Some((ny as usize, nx as usize))
            } else {
                None
            }
        })
    }
    pub fn run_length_encoding<T: Clone + PartialEq>(slice: &[T]) -> Vec<(i64, T)> {
        if slice.len() == 0 {
            return vec![];
        }
        let mut acc = vec![];
        let mut current = slice[0].clone();
        let mut cnt = 1i64;
        for i in 1..slice.len() {
            if current != slice[i] {
                acc.push((cnt, current));
                cnt = 0;
            }
            current = slice[i].clone();
            cnt += 1;
        }
        acc.push((cnt, current));
        acc
    }
    pub fn count<T: Eq + std::hash::Hash + Clone>(
        slice: &[T],
    ) -> std::collections::HashMap<T, usize> {
        let mut hmap = std::collections::HashMap::new();
        for item in slice {
            *hmap.entry(item.clone()).or_insert(0) += 1;
        }
        hmap
    }
    pub fn indices_by_elem<T: Eq + std::hash::Hash + Clone>(
        slice: &[T],
    ) -> std::collections::HashMap<T, Vec<usize>> {
        let mut hmap = std::collections::HashMap::new();
        for i in 0..slice.len() {
            hmap.entry(slice[i].clone()).or_insert(vec![]).push(i);
        }
        hmap
    }
    pub fn combine<S: Clone, T: Clone, U: std::iter::FromIterator<(S, T)>>(
        left: &[S],
        right: &[T],
    ) -> U {
        let mut ret = vec![];
        for i in 0..left.len() {
            for j in 0..right.len() {
                ret.push((left[i].clone(), right[j].clone()));
            }
        }
        ret.into_iter().collect::<U>()
    }
    pub fn uncount<T: Clone + Eq + std::hash::Hash>(
        hmap: &std::collections::HashMap<T, usize>,
    ) -> Vec<T> {
        hmap.iter()
            .map(|(k, v)| vec![k.clone(); *v])
            .flatten()
            .collect()
    }
    pub fn max_with_index<T: Ord>(slice: &[T]) -> (usize, &T) {
        let mut value: Option<&T> = None;
        let mut index = 0;
        for i in 0..slice.len() {
            if let Some(v) = value {
                if v < &slice[i] {
                    index = i;
                    value = Some(&slice[i]);
                }
            } else {
                index = i;
                value = Some(&slice[i]);
            }
        }
        (index, value.expect("not found max value"))
    }
    pub fn min_with_index<T: Ord>(slice: &[T]) -> (usize, &T) {
        let mut value: Option<&T> = None;
        let mut index = 0;
        for i in 0..slice.len() {
            if let Some(v) = value {
                if v > &slice[i] {
                    index = i;
                    value = Some(&slice[i]);
                }
            } else {
                index = i;
                value = Some(&slice[i]);
            }
        }
        (index, value.expect("not found min value"))
    }
    pub fn split<T: PartialEq + Clone>(slice: &[T], sep: T) -> Vec<Vec<T>> {
        slice.iter().fold(vec![vec![]], |mut acc, x| {
            if x == &sep {
                acc.push(vec![]);
                acc
            } else {
                let last = acc.len() - 1;
                acc[last].push(x.clone());
                acc
            }
        })
    }
    pub fn join<T: std::fmt::Display>(slice: &[T], sep: &str) -> String {
        let strings = slice.iter().map(|t| format!("{}", t)).collect::<Vec<_>>();
        strings.join(sep)
    }
    pub fn coord_comp(slice: &[i64]) -> (Vec<i64>, HashMap<i64, usize>) {
        let mut set = BTreeSet::new();
        for &item in slice {
            set.insert(item);
        }
        let mut hmap = HashMap::new();
        for (i, &v) in set.iter().enumerate() {
            hmap.insert(v, i);
        }
        (set.into_iter().collect::<Vec<_>>(), hmap)
    }
    pub fn shakutori(n: usize, k: i64, a: &[i64]) -> usize {
        let mut sum = 0;
        let mut right = 0;
        let mut ret = 0;
        for left in 0..n {
            while right < n && sum <= k {
                sum += a[right];
                right += 1;
            }
            ret += right - left;
            if right == left {
                right += 1;
            } else {
                sum -= a[left];
            }
        }
        ret
    }
    pub fn inverse(a: &[usize], n: usize) -> Vec<usize> {
        let mut inv = vec![0; n];
        for i in 0..a.len() {
            inv[a[i]] = i;
        }
        inv
    }
    pub fn pow(x: i64, y: i64) -> i64 {
        (x as f64).powi(y as i32) as i64
    }
    pub fn ceil_div<T: Copy + ZeroOne + Add<Output = T> + Sub<Output = T> + Div<Output = T>>(
        x: T,
        y: T,
    ) -> T {
        (x + y - T::one()) / y
    }
    pub fn ceil_mod<
        T: Copy + ZeroOne + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T>,
    >(
        x: T,
        y: T,
    ) -> T {
        ceil_div(x, y) * y
    }
    pub fn unzip<P: Clone, Q: Clone>(v: &[(P, Q)]) -> (Vec<P>, Vec<Q>) {
        (
            v.iter().map(|t| t.0.clone()).collect(),
            v.iter().map(|t| t.1.clone()).collect(),
        )
    }
    pub fn unzip3<P: Clone, Q: Clone, R: Clone>(v: &[(P, Q, R)]) -> (Vec<P>, Vec<Q>, Vec<R>) {
        (
            v.iter().map(|t| t.0.clone()).collect(),
            v.iter().map(|t| t.1.clone()).collect(),
            v.iter().map(|t| t.2.clone()).collect(),
        )
    }
    pub fn base(c: char, b: char) -> usize {
        c as usize - b as usize
    }
    pub fn base_signed(c: char, b: char) -> i64 {
        c as i64 - b as i64
    }
    pub fn is_palindrome<T: Clone + Eq>(chars: &[T]) -> bool {
        let s = chars.to_vec();
        let mut t = s.clone();
        t.reverse();
        (0..s.len()).filter(|&i| s[i] == t[i]).count() == s.len()
    }
}
mod tiny_num_traits {
    pub trait ZeroOne {
        fn zero() -> Self;
        fn one() -> Self;
    }
    macro_rules! impl_zero_one {
        ( $ tpe : ident ) => {
            impl ZeroOne for $tpe {
                fn zero() -> Self {
                    0
                }
                fn one() -> Self {
                    1
                }
            }
        };
    }
    impl_zero_one!(i64);
    impl_zero_one!(i32);
    impl_zero_one!(usize);
}
mod extra {
    use std::iter::{FromIterator, Sum};
    pub trait VecExtra<T> {
        fn map<B, F>(&self, f: F) -> Vec<B>
        where
            F: FnMut(T) -> B;
        fn filter<P>(&self, predicate: P) -> Vec<T>
        where
            P: FnMut(&T) -> bool;
        fn filter_map<B, F>(&self, f: F) -> Vec<B>
        where
            F: FnMut(T) -> Option<B>;
        fn any<P>(&self, predicate: P) -> bool
        where
            P: FnMut(&T) -> bool;
        fn all<P>(&self, predicate: P) -> bool
        where
            P: FnMut(&T) -> bool;
        fn sum<S>(&self) -> S
        where
            S: Sum<T>;
        fn enumerate(&self) -> Vec<(usize, T)>;
        fn to<B: FromIterator<T>>(&self) -> B;
    }
    impl<T: Clone> VecExtra<T> for Vec<T> {
        fn map<B, F>(&self, f: F) -> Vec<B>
        where
            F: FnMut(T) -> B,
        {
            self.iter().cloned().map(f).collect()
        }
        fn filter<P>(&self, predicate: P) -> Vec<T>
        where
            P: FnMut(&T) -> bool,
        {
            self.iter().cloned().filter(predicate).collect()
        }
        fn filter_map<B, F>(&self, f: F) -> Vec<B>
        where
            F: FnMut(T) -> Option<B>,
        {
            self.iter().cloned().filter_map(f).collect()
        }
        fn any<P>(&self, predicate: P) -> bool
        where
            P: FnMut(&T) -> bool,
        {
            self.iter().any(predicate)
        }
        fn all<P>(&self, predicate: P) -> bool
        where
            P: FnMut(&T) -> bool,
        {
            self.iter().all(predicate)
        }
        fn sum<S>(&self) -> S
        where
            S: Sum<T>,
        {
            Sum::sum(self.iter().cloned())
        }
        fn enumerate(&self) -> Vec<(usize, T)> {
            self.iter().cloned().enumerate().collect()
        }
        fn to<B: FromIterator<T>>(&self) -> B {
            self.iter().cloned().collect()
        }
    }
    pub trait StringExtra {
        fn to_chars(self) -> Vec<char>;
    }
    impl StringExtra for String {
        fn to_chars(self) -> Vec<char> {
            self.chars().collect()
        }
    }
}
mod scanner {
    use std::io::{stdin, BufReader, Bytes, Read, Stdin};
    use std::str::FromStr;
    pub struct Scanner {
        buf: Bytes<BufReader<Stdin>>,
    }
    impl Scanner {
        pub fn new() -> Scanner {
            Scanner {
                buf: BufReader::new(stdin()).bytes(),
            }
        }
        pub fn read_next<T: FromStr>(&mut self) -> Option<T> {
            let token = self
                .buf
                .by_ref()
                .map(|c| c.unwrap() as char)
                .skip_while(|c| c.is_whitespace())
                .take_while(|c| !c.is_whitespace())
                .collect::<String>();
            token.parse::<T>().ok()
        }
        pub fn read<T: FromStr>(&mut self) -> T {
            self.read_next().unwrap()
        }
        pub fn readn<T: FromStr>(&mut self, n: usize) -> Vec<T> {
            (0..n).map(|_| self.read::<T>()).collect()
        }
        pub fn chars(&mut self) -> Vec<char> {
            self.read::<String>().chars().collect()
        }
    }
}



Measured memory_bytes: 13588