n,a,b,c=map(int,input().split())
z=a+b+c
if z==0:
    print('No')
if z==2:
    ans=[]
    sl=[]
    for i in range(n):
        sl.append(input())
    i=0
    while i<n:
        s=sl[i]
        if s=='AB' and a==0 and b==0:
            print('No')
            exit()
        if s=='BC' and c==0 and b==0:
            print('No')
            exit()
        if s=='AC' and a==0 and c==0:
            print('No')
            exit()
        if s=='AB':
            if a<b:
                b-=1
                a+=1
                ans.append('A')
            elif a>b:
                a-=1
                b+=1
                ans.append('B')
            else:
                i+=1
                ff=1
                while i<n and sl[i]=='AB':
                    ff+=1
                    i+=1
                if i==n:
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('A')
                        else:
                            ans.append('B')
                    break
                if sl[i]=='AC':
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('A')
                            a+=1
                            b-=1
                        else:
                            ans.append('B')
                            b+=1
                            a-=1
                if sl[i]=='BC':
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('B')
                            b+=1
                            a-=1
                        else:
                            ans.append('A')
                            b-=1
                            a+=1
                            
                continue
        if s=='AC':
            if c<a:
                a-=1
                c+=1
                ans.append('C')
            elif c>a:
                c-=1
                a+=1
                ans.append('A')
            else:
                i+=1
                ff=1
                while i<n and sl[i]=='AC':
                    ff+=1
                    i+=1
                if i==n:
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('A')
                        else:
                            ans.append('C')
                    break
                if sl[i]=='AB':
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('A')
                            a+=1
                            c-=1
                        else:
                            ans.append('C')
                            a-=1
                            c+=1
                if sl[i]=='BC':
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('C')
                            c+=1
                            a-=1
                        else:
                            ans.append('A')
                            c-=1
                            a+=1                            
                continue
        if s=='BC':
            if c<b:
                b-=1
                c+=1
                ans.append('C')
            elif c>b:
                c-=1
                b+=1
                ans.append('B')
            else:
                i+=1
                ff=1
                while i<n and sl[i]=='BC':
                    ff+=1
                    i+=1
                if i==n:
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('C')
                        else:
                            ans.append('B')
                    break
                if sl[i]=='AC':
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('C')
                            c+=1
                            b-=1
                        else:
                            ans.append('B')
                            c-=1
                            b+=1
                if sl[i]=='AB':
                    for pp in range(ff):
                        if pp%2==0:
                            ans.append('B')
                            c-=1
                            b+=1
                        else:
                            ans.append('C')
                            c+=1
                            b-=1
                            
                continue
        i+=1
    print('Yes')
    for i in ans:
        print(i)     
if z>=3 or z==1:
    ans=[]
    for i in range(n):
        s=input()
        if s=='AB' and a==0 and b==0:
            print('No')
            exit()
        if s=='BC' and c==0 and b==0:
            print('No')
            exit()
        if s=='AC' and a==0 and c==0:
            print('No')
            exit()
        if s=='AB':
            if b<a:
                a-=1
                b+=1
                ans.append('B')
            else:
                b-=1
                a+=1
                ans.append('A')
        if s=='AC':
            if c<a:
                a-=1
                c+=1
                ans.append('C')
            else:
                c-=1
                a+=1
                ans.append('A')
        if s=='BC':
            if c<b:
                b-=1
                c+=1
                ans.append('C')
            else:
                c-=1
                b+=1
                ans.append('B')
    print('Yes')
    for i in ans:
        print(i)
      


Measured memory_bytes: 84956