What Should We Name the Contest
InterviewTime limit1sMemory limit1024 MB
Given string S, decide whether some subsequence of length M ends with A, A, then a consonant, and print one such subsequence if it exists.
Problem
The staff is still picking a name for the next contest. For several weeks they have used "what should we name the contest" as the contest name in their Google Drive, the problem and editorial files, and the Discord server.
One day they thought of the name KSA Automata Contest, took its capital letters, and decided to call it KSAAC. Later they noticed that KSAAC is pronounced "keu-sa-aak", and the name was settled.
To run the next contest smoothly, the staff decided to choose the name as follows.
- First, through negotiation, they fix a string of length made of uppercase English letters.
- Delete zero or more characters from to form the contest name .
- must be a staff-favorite name of length . A staff-favorite name is a string whose last letter is a consonant (a letter from
AtoZother thanA,E,I,O,U), and whose second and third letters from the end are bothA.
Help the staff stop wasting weeks on naming the next contest!
Input
The first line contains two integers and .
The second line contains the string .
Output
If the contest name can be chosen by the method above, print YES on the first line. Otherwise, print NO.
If it can be chosen, print on the second line a possible string as the contest name.
If several answers exist, you may print any of them.
Constraints
- is a string of uppercase English letters