program fm
  implicit none
  integer::N
  integer::a,b,c
  character(2),allocatable,dimension(:)::S
  character,allocatable,dimension(:)::ans
  
  integer::i
  read*,N,a,b,c
  allocate(S(N+1))
  do i=1,N
    read*,S(i)
  end do
  S(N+1)="KK"
  allocate(ans(N))
  
  if(a+b+c==0)then
    print"(A)","No"
    stop
  endif
  if(a+b+c==1)then
    do i=1,N
      if(a+b==0.and.S(i)=="AB")then
        print"(A)","No"
        stop
      endif    
      if(a+c==0.and.S(i)=="AC")then
        print"(A)","No"
        stop
      endif
      if(b+c==0.and.S(i)=="BC")then
        print"(A)","No"
        stop
      endif
      if(S(i)=="AB")then
        if(a==0)then
          a=1;b=0
          ans(i)="A"
        else
          a=0;b=1
          ans(i)="B"
        endif
      endif
      if(S(i)=="AC")then
        if(a==0)then
          a=1;c=0
          ans(i)="A"
        else
          a=0;c=1
          ans(i)="C"
        endif
      endif
      if(S(i)=="BC")then
        if(b==0)then
          b=1;c=0
          ans(i)="B"
        else
          b=0;c=1
          ans(i)="C"
        endif
      endif
    end do
  else
    if(a+b==0.and.S(1)=="AB")then
      print"(A)","No"
      stop
    endif    
    if(a+c==0.and.S(1)=="AC")then
      print"(A)","No"
      stop
    endif
    if(b+c==0.and.S(1)=="BC")then
      print"(A)","No"
      stop
    endif
    do i=1,N
      if(S(i)=="AB")then
        if(a<b.or.(A+B+C==2.and.A*B==1.and.S(i+1)=="AC"))then
          a=a+1;b=b-1
          ans(i)="A"
        else
          a=a-1;b=b+1
          ans(i)="B"
        endif
      endif
      if(S(i)=="AC")then
        if(a<c.or.(A+B+C==2.and.A*C==1.and.S(i+1)=="AB"))then
          a=a+1;c=c-1
          ans(i)="A"
        else
          a=a-1;c=c+1
          ans(i)="C"
        endif
      endif
      if(S(i)=="BC")then
        if(b<c.or.(A+B+C==2.and.B*C==1.and.S(i+1)=="AB"))then
          b=b+1;c=c-1
          ans(i)="B"
        else
          b=b-1;c=c+1
          ans(i)="C"
        endif
      endif
    end do
  endif
  print"(a)","Yes"
  do i=1,N
    print"(A)",ans(i)
  end do
end program fm