Under construction

Still being built. Things may change

Clothes Hangers

Interview

Time limit1sMemory limit256 MB

Summary
Given each hanger's type and the counts of tops and bottoms, decide whether all clothes can be hung and print one valid assignment if so.
Level

Easy2 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Gyeonggi Science High School has a formidable department called the Self-Governance Department. One of its main duties is to enter assigned dormitory rooms in the morning and check whether the rooms are tidy. Eunho is a member of this department and must inspect every room in the dormitory. However, clothes were scattered all over each room he checked, and the rooms were badly messy. So Eunho decided to hold a dormitory cleaning day and tidy up all the clothes.

Eunho surveyed the clothes hangers at Gyeonggwak dormitory and found three kinds. One kind holds only tops, another holds only bottoms, and the last kind holds both tops and bottoms. A single hanger can hold only one top or only one bottom.

Before tidying up, Eunho wants to check whether the hangers are enough to hold all the clothes. He surveyed the number of tops and bottoms, and the number and kinds of hangers at Gyeonggwak dormitory. Surprisingly, the number of hangers and the number of clothes are the same. There are too many clothes to sort by hand, so Eunho wants a program that determines whether all the clothes can be hung. If they can, he also wants to know how to hang them.

Eunho had an urgent appointment with Geonpyo and left the implementation of this program to you. Write the program on Eunho's behalf.

Input

The first line contains the number of hangers NN.

The second line contains NN integers. The ii-th integer AiA_i is the kind of the ii-th hanger.

1 means a top-only hanger, 2 means a bottom-only hanger, and 3 means a hanger that can hold both tops and bottoms.

The last line contains two integers UU and DD. UU is the number of tops, and DD is the number of bottoms. It is guaranteed that U+D=NU+D=N.

Output

If all the given tops and bottoms can be hung on the hangers, print YES on the first line. Otherwise, print NO.

If all the clothes can be hung, print on the second line a string of length NN showing how each hanger was used. The ii-th character of the string is the kind of clothes hung on the ii-th hanger: U for a top and D for a bottom. (Do not print the single quotes.)

The characters must be printed in uppercase.

Constraints

1≤N≤1,000,0001\leq N\leq 1,000,000

0≤U,D≤N0\leq U,D\leq N

U+D=NU+D=N

Ai∈{1,2,3}A_i\in\{1,2,3\}

Examples3

  1. Example 1

    Input
    5
    3 3 3 3 3
    2 3
    
    Expected output
    YES
    UUDDD
    
  2. Example 2

    Input
    5
    2 1 3 3 2
    2 3
    
    Expected output
    YES
    DUUDD
    
  3. Example 3

    Input
    3
    1 1 1
    0 3
    
    Expected output
    NO