import qualified Data.Map as M
import Data.List

data ABC = AB | BC | AC deriving Read

main = do
  li <- getLine
  let [n,a,b,c] = map read $ words li
  co <- getContents
  let ss = map read $ lines co
  let ans = compute n a b c ss
  putStrLn ans

compute :: Int -> Int -> Int -> Int -> [ABC] -> String
compute n a b c ss =
  case M.lookupMin $ foldl step (M.singleton (a,b,c) "") ss of
    Nothing -> "No"
    Just (_,ts) -> "Yes\n" ++ intersperse '\n' (reverse ts)

step m abc = M.fromList [ e1 | e0 <- M.assocs m, e1@((a,b,c),_) <- f abc e0, a >= 0, b >= 0, c >= 0]

-- Lensを使えばこのクローンはきれいにできそうだが。
f AB ((a,b,c),st) = [((succ a, pred b, c),'A':st) | a <= b] ++ [((pred a, succ b, c),'B':st) | a >= b]
f AC ((a,b,c),st) = [((succ a, b, pred c),'A':st) | a <= c] ++ [((pred a, b, succ c),'C':st) | a >= c]
f BC ((a,b,c),st) = [((a, succ b, pred c),'B':st) | b <= c] ++ [((a, pred b, succ c),'C':st) | b >= c]
