시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 27 | 11 | 11 | 52.381% |
A song consists of one or more verses, and each verse consists of four lines. Each line consists of one or more words separated by single blank character, and finally, each word consists of one or more letters (a-z, A-Z).
We define the last syllable of a word to be the sequence of letters from the last vowel (inclusively) to the end of the word. If a word has no vowel, then the last syllable is the word itself.
We say that two lines rhyme if they have same last syllables (ignoring the letter case). Verse can have perfect rhyme, even rhyme, cross rhyme, shell rhyme or there can be no rhyme at all (free rhyme).
Verse has a perfect rhyme if all lines in a verse mutually rhyme (a a a a).
If verse does not have a perfect rhyme then we say that it has:
Write a program that will determine the rhyme for each verse in a song.
The first line of the input file contains an integer N, the number of verses in the song, 1 ≤ N ≤ 5.
The following 4N lines of the input file contain the lines of the song. Maximal length of each line is 50.
Output file should have N lines. For each verse in a song there should a single line containing one of the words 'perfect', 'even', 'cross', 'shell' or 'free' describing the rhyme in that verse.
1 mi smo Super Edit Pjaf Ran gari geri kuper ej pazi na ekran
cross