Given words in one language , and a text with words written in another language , print all the possible translations of the text to , assuming that there is a bijection between the words of and .
Input consists of several cases. Every case begins with , followed by the words of the language , in increasing order, each one made up of between one and six lowercase letters. Follow , followed by the words of the text written in , each one made up of between one and six uppercase letters. This text contains exactly different words. Assume and .
For every case, print in alphabetical order all the possible translations of the text in to . Print a line with 10 dashes at the end of each case.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T10:12:25.406Z
© Jutge.org, 2006–2026.
https://jutge.org