object Main extends App {
  import java.util.Scanner
  val sc = new Scanner(System.in)

  val n = sc.nextInt()
  val a = sc.nextInt()
  val b = sc.nextInt()
  val c = sc.nextInt()
  val s = (1 to n).map { _ =>
    sc.next("(AB|AC|BC)")
  }.toList

  def traverse(a: Int,
               b: Int,
               c: Int,
               s: List[String],
               trace: List[Char]): Option[List[Char]] = {
    s match {
      case Nil => Some(trace.reverse)
      case "AB" :: t =>
        val a1 = a + 1
        val b1 = b - 1
        val r1 = if (a1 >= 0 && b1 >= 0 && c >= 0) {
          traverse(a1, b1, c, t, 'A' :: trace)
        } else None
        if (r1.nonEmpty) {
          r1
        } else {
          val a2 = a - 1
          val b2 = b + 1
          if (a2 >= 0 && b2 >= 0 && c >= 0) {
            traverse(a2, b2, c, t, 'B' :: trace)
          } else None
        }
      case "AC" :: t =>
        val a1 = a + 1
        val c1 = c - 1
        val r1 = if (a1 >= 0 && b >= 0 && c1 >= 0) {
          traverse(a1, b, c1, t, 'A' :: trace)
        } else None
        if (r1.nonEmpty) {
          r1
        } else {
          val a2 = a - 1
          val c2 = c + 1
          if (a2 >= 0 && b >= 0 && c2 >= 0) {
            traverse(a2, b, c2, t, 'C' :: trace)
          } else None
        }
      case "BC" :: t =>
        val b1 = b + 1
        val c1 = c - 1
        val r1 = if (a >= 0 && b1 >= 0 && c1 >= 0) {
          traverse(a, b1, c1, t, 'B' :: trace)
        } else None
        if (r1.nonEmpty) {
          r1
        } else {
          val b2 = b - 1
          val c2 = c + 1
          if (a >= 0 && b2 >= 0 && c2 >= 0) {
            traverse(a, b2, c2, t, 'C' :: trace)
          } else None
        }
    }
  }
  traverse(a, b, c, s, Nil) match {
    case Some(value) =>
      println("Yes")
      println(value)
      value.foreach(println)
    case None =>
      println("No")
  }

}
