The term sonnet derives from the Provencal word sonet and the Italian word sonetto, both meaning “little song”. By the thirteenth century, it had come to signify a poem of fourteen lines that follows a strict rhyme scheme and logical structure. The conventions associated with the sonnet have evolved over its history. The writers of sonnets are known as sonneteers.
Written in Spanish, sonnets have a well defined structure over the rhymes. Moreover, these days sonneteers are scarce as good weather and the rules governing the rhymes are rather permissive. Let us consider the following poem:
ES ELLA
Locura, intensa y sin medida
andando errante te avisté,
una nota en tus manos encontré:
rumor de un amor y su partida. Adelante, te diré de su vida
aunque en mi regazo ya no esté, fueron sus labios con que tropecé
los que te llamaron despavorida.
Ojos negros, pestañas en un ramo, rizos finos, humor, siempre bella; !es ella, amiga, a quien amo! Zagales de secretos sus estrellas, cómplices la lluvia y el álamo; ... es ella, nuestra musa, !
es ella!
This poem must be consider as sonnet because it meets the following rules:
11339 – Sonnet Rhyme Verifier 2/2 Input
The input consists of several instances of the problem, each one occurring separated by a new line. Each instance consists of n > 2 lines: the first one consists of a list of s suffixes (4 ≤ s ≤ 5), separated by a blank character. The suffixes are to be called A, B, C, D and E according to the order in which they occur and the total number of them. The second line contains the title of the composition. The following n − 2 lines contain the actual lines of the composition. Each line in the sonnet has at most 80 characters. You can safely assume that, in a case, a given suffix is not suffix of another one.
Output
For each problem instance, and according to the order of the input, your program should print a sentence of the form
< NAME >: < STRUCTURE >
if the given composition adheres to the first two rules of a spanish sonnet or < NAME >: Not a chance!
in other case, where < NAME > is to be replaced by the name of the composition and < STRUCTURE > corresponds to the structure of the rhyme, and is given by the order in which the suffixes occur.
Sample Input
ida é amo ella
ES ELLA
Locura, intensa y sin medida
andando errante te avisté,
una nota en tus manos encontré:
rumor de un amor y su partida. Adelante, te diré de su vida
aunque en mi regazo ya no esté, fueron sus labios con que tropecé
los que te llamaron despavorida.
Ojos negros, pestañas en un ramo, rizos finos, humor, siempre bella; !es ella, amiga, a quien amo! Zagales de secretos sus estrellas, cómplices la lluvia y el álamo; ... es ella, nuestra musa, !
es ella!
ura ima illa eto
OTrO
Esta composición posiblemente rima
pero nunca será un soneto
con esta frase ya no sirve
ni tampoco porque está incompleto.
Sample Output
ES ELLA: ABBAABBACDCDCD
OTrO: Not a chance!