#K59567. Morse Code Decoder

    ID: 30893 Type: Default 1000ms 256MiB

Morse Code Decoder

Morse Code Decoder

You are given a string representing a sequence in Morse code, where a single space ' ' is used to separate letters within a word and three spaces ' ' are used to separate words.

Your task is to decode the Morse code into its corresponding English sentence. The Morse code mappings are provided below in LaTeX format:

\(\text{MORSE extunderscore CODE extunderscore DICT} = \{ \ '.-' : 'A',\ '-...' : 'B',\ '-.-.' : 'C',\ '-..' : 'D',\ '.' : 'E',\ '..-.' : 'F',\ '--.' : 'G',\ '....' : 'H',\ '..' : 'I',\ '.---' : 'J',\ '-.-' : 'K',\ '.-..' : 'L',\ '--' : 'M',\ '-.' : 'N',\ '---' : 'O',\ '.--.' : 'P',\ '--.-' : 'Q',\ '.-.' : 'R',\ '...' : 'S',\ '-' : 'T',\ '..-' : 'U',\ '...-' : 'V',\ '.--' : 'W',\ '-..-' : 'X',\ '-.--' : 'Y',\ '--..' : 'Z',\ '-----' : '0',\ '.----' : '1',\ '..---' : '2',\ '...--' : '3',\ '....-' : '4',\ '.....' : '5',\ '-....' : '6',\ '--...' : '7',\ '---..' : '8',\ '----.' : '9',\ '--..--' : ',',\ '.-.-.-' : '.',\ '..--..' : '?',\ '-..-.' : '/',\ '-....-' : '-',\ '-.--.' : '(',\ '-.--.-' : ')',\ '.-...' : '&' \} \)

inputFormat

The input consists of a single line containing a Morse code string. Letters within a word are separated by a single space, and words are separated by three spaces.

outputFormat

Output the decoded English sentence corresponding to the Morse code provided.

## sample
.... .
HE