Problem D
SETI
For some years, quite a lot of work has been put into listening to electromagnetic radio signals received from space, in order to understand what civilizations in distant galaxies might be trying to tell us. One signal source that has been of particular interest to the scientists at Université de Technologie Spatiale is the Nebula Stupidicus.
Recently, it was discovered that if each message is assumed
to be transmitted as a sequence of integers
These relationships altogether have been considered too peculiar for being pure coincidences, so this calls for further investigation.
The linguists at the faculty of Langues et Cultures
Extraterrestres transcribe these messages to strings in
the English alphabet to make the messages easier to handle
while trying to interpret their meanings. The transcription
procedure simply assigns the letters
The backward transcription procedure, has however, turned
out to be too complex for the linguists to handle by
themselves. You are therefore assigned the task of writing a
program that converts strings created in this way back to the
original number sequence
Input
On the first line of the input there is a single positive
integer
Output
For each transcribed string, output a line with the
corresponding list of integers
Sample Input 1 | Sample Output 1 |
---|---|
3 31 aaa 37 abc 29 hello*earth |
1 0 0 0 1 0 8 13 9 13 4 27 18 10 12 24 15 |