Learning Portuguese

Portuguese is one of the most beautiful languages in the whole world, but almost everyone who speaks Portuguese is either brazilian or portuguese. Since people all around the world (and not just brazilians) are participating in this contest, we would like to help you to begin learning portuguese with this problem. Well, the program you’ll write will help you (if it’s correct). All you must to do is to write a conjugator, that is, a program that conjugates verbs. In English there’s not much to do when the verb is “regular” (it follows some model). But in Portuguese it’s a bit different. But don’t worry, we’ll explain all you need to know in order to learn how to conjugate regular portuguese verbs. First of all, let’s learn the pronouns, which you’ll use to conjugate the verbs: English Portuguese I Eu You Tu He/She Ele/Ela We Nós You Vós They Eles/Elas The “ó” character is represented by ASCII code 243. It doesn’t matter how it looks on your screen, use ASCII character 243 when writing “nós” and “vós”! In Portuguese, all verbs in the infinitive mode have one of these sufixes: ar (first conjugations), er (second conjugation) and ir (third conjugation). For instance, “amar” (to love) is from the first conjugation, whereas “correr” (to run) is from the second, and “partir” (to go away) is from the third. So, you can recognize from which conjugations is the verb by its sufix (of course there are some exceptions to this rules, but we’re not going to handle them). We call “root” the verb in the infinitive mode without the sufix (so, for these three verbs we just saw, we have “am”, “corr” and “part” as roots). We call the “thematic vowel” (tv for short) the vowel of the sufix (i.e. “a”, “e” or “i”). To conjugate regular verbs, all you have to do is to find out from which conjugations is the verb and, then, follow the model for that conjugation. In this problem we are only interested in the “presente tense”, so here are the models for all conjugations on the presente tense: Pronoun 1st Conjugation 2nd Conjugation 3rd Conjugation root + o root + es root + e root + tv + mos root + tv + s root + em Eu root + o Tu root + tv Ele/Ela root + tv Nós root + tv Vós root + tv Eles/Elas root + tv +s

  • mos + is +m root+o root + tv root + tv root + tv root + tv root + tv +s

  • mos +is +m Let’s see, as an example, the conjugation of the three verbs above: Pronoun amar Eu amo Tu amas Ele/Ela ama Nós amamos Vós amais Eles/Elas amam correr corro corres corre corremos correis correm partir parto partes parte partimos partis partem

    2/2 So, your task is: given a verb in Portuguese (and its meaning in English), conjugate the verb. Input There will be two words per line, v1 and v2. The first one (v1) is the verb in Portuguese, and the second one (v2) is its meaning in English. All words will be formed by just latin lowercase letters (i.e. all letters will lie in the range [a..z]). No word will have more than 30 characters. You must read until you reach the end of file. Output For each pair of words, the first line of output must be: v1 (to v2) Where v1 stands for the verb in Portuguese and v2 its meaning in English (as described above). After that, you must print 6 lines with the correct conjugation, assuming the verb will be regular. The first character of the pronoun must start at the first column of the line. The equivalent conjugation to that pronoun must begin at column 11 of the same line. The space between the pronoun and the conjugation must be filled with blanks. If the verb read lies in none of the conjugations given, instead of the conjugation, just print the line Unknown conjugation You must print a blank line between the output sets. Sample Input falar talk compor compose andar walk Sample Output falar (to talk) eu tu ele/ela n s v s eles/elas falam compor (to compose) Unknown conjugation andar (to walk) eu tu ele/ela n s v s eles/elas andam falo falas fala falamos falais ando andas anda andamos andais