题目描述
Problem Description
There were $ N $ participants in the qualification round of CODE FESTIVAL 2016. Each participant is either a domestic student, a foreign student, or neither.
Only domestic or foreign students can qualify for the next round. They qualify in the order from the highest-ranked participant, following these conditions: Participants who are not students cannot qualify.
- A domestic student qualifies if the number of participants who have already qualified is less than $ A+B $.
- A foreign student qualifies if the number of participants who have already qualified is less than $ A+B $ and if their rank among foreign students is within the top $ B $.
You are given a string $ S $ representing the information about the participants. The $ i $-th character of $ S $ is a if the $ i $-th participant is a domestic student, b if the $ i $-th participant is a foreign student, and c if the $ i $-th participant is neither.
Create a program that outputs Yes if the participant at the $ i $-th position qualifies, and No otherwise, for all participants in order from the highest rank.
Input Format
The input is given from the standard input in the following format:
$ N $ $ A $ $ B $ $ S $
Output Format
Output $ N $ lines. The $ i $-th line should contain Yes if the $ i $-th participant qualifies, and No otherwise.
Sample Input and Output
Sample Input #1
10 2 3
abccabaabb
Sample Output #1
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No
Sample Input #2
12 5 2
cabbabaacaba
Sample Output #2
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No
Sample Input #3
5 2 2
ccccc
Sample Output #3
No
No
No
No
No
Notes/Hints
Constraints
- $1 \leq N, A, B \leq 100000$
- $A + B \leq N$
- The length of $ S $ is $ N $.
- $ S $ consists only of the characters
a,b, andc.
Sample Explanation 1
Participants at positions $ 1, 2, 5, 6, 7 $ qualify.
Sample Explanation 2
The participant at position $ 6 $ is the third among foreign students and does not qualify.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分