#000134

O-morse translator

Write a program for translating a text in morse code or vice versa.
Morse code is made of signs: ‘.’ (dot) and ‘-’ (dash).


Image: morse

This is the table for the morse codes of the 26 letters and 4 signs.
Letters inside a single word are separated by ‘ ‘ (one empty space) and two words in the text are separated with ‘ ‘ (two empty spaces).


InputThe first line of standard input contains a text (not more than 2 MB of data). Text will be either all in morse code (dots, dash and spaces) or in English alphabet (26 small or big letters and 4 signs ‘,’,‘.’, ‘@’, ‘?’, and empty space).
When the morse code is given on the input, there will be at least one sign ‘-‘ and no more than two consecutive spaces (when translated).
If English text is given on input, it will not have more than one space between the words.

OutputIn one line, output the converted text in lowercase.

Input:
Kako da PREVEDEM .,@?
Output:
-.- .- -.- ---  -.. .-  .--. .-. . ...- . -.. . --  .-.-.- --..-- .--.-. ..--..


Input:
.. -- . .-.-.- .--. .-. . --.. .. -- . .--.-. --. -- .- .. .-.. .-.-.- -.-. --- --
Output:
ime.prezime@gmail.com

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.