405074: GYM101775 H Mr. Panda and Birthday Song
Description
Mrs. Panda’s birthday is coming. Mr. Panda wants to compose a song as gift for her birthday.
It is known that Mrs. Panda does not like a song if and only if its lyrics contain X vowels in a row, or Y consonants in a row (Otherwise, Mrs. Panda likes the song). The letters 'a', 'e', 'i', 'o', 'u' are vowels, and all others are consonants.
Though Mr. Panda is a gifted singer, he is bad at composing lyrics. Mr. Panda wants the song to be special. Thus, he searched Google for a template for lyrics of the song.
The template consists of lowercase English letters and possibly question marks. For example, "happybirthday" (without quotes, the same below), "????ybirthday" are valid templates but neither "happy birthday" nor "HappyBirthday" is. Mr. Panda needs to substitute all the question marks with lowercase English letters so that it becomes actual lyrics of the song.
Mr. Panda wants to give a surprise to Mrs. Panda. So, Mr. Panda hopes to compose not only a song from the template that Mrs. Panda likes but also a song from the same template that Mrs. Panda dislikes.
Because Mr. Panda is really bad at composing lyrics, even with a template, the task has confused him for days. Luckily, Mr. Panda knows you are in the contest and wants to ask you for help.
For a given template, output either "DISLIKE" (without quotes, the same below) if Mrs. Panda dislikes all the songs that are generated from the template (that means you cannot substitute letters for question marks so that Mrs. Panda likes the song), "LIKE" if Mrs. Panda likes all the songs that are generated from the template, or "SURPRISE" if Mr. Panda can compose a song Mrs. Panda likes and another song Mrs. Panda dislikes.
InputThe first line of the input gives the number of test cases, an integer T. T test cases follow.
Each test case consists of a line containing a string S, the template that Mr. Panda gets, an integer X, the minimum number of continuous vowels that Mrs. Panda dislikes, and an integer Y, the minimum number of continuous consonants that Mrs. Panda dislikes. In the template S, each character can be either one of lowercase English letters ('a’ to 'z’) or question mark ('?’).
- 1 ≤ T ≤ 300.
- 2 ≤ |S| ≤ 106.
- 1 ≤ X ≤ |S|.
- 1 ≤ Y ≤ |S|.
- Sum of |S| over all test cases ≤ 5 × 107.
For each test case, output one line containing "Case #x: y", where x is the test case number (starting from 1) and y can be either "LIKE", "DISLIKE" or "SURPRISE" as mentioned in the problem description.
ExampleInput5Output
happybirthda? 3 4
happybirth?ay 3 5
happybirthd?y 3 5
hellow?rld 3 5
helllllowooorld 3 5
Case #1: DISLIKE
Case #2: LIKE
Case #3: SURPRISE
Case #4: SURPRISE
Case #5: DISLIKE