407198: GYM102697 169 SOS

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

169. SOStime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
This problem is worth 30 points.

Morse code, developed in 1837, along with the invention of the telegram, was a revolutionary invention that struck a new frontier in the subject of telecommunications. Through a series of electrical pulses, messages could be sent to far distances through a series of dots and dashes, and at a speed that was unheard of before its invention. Since then, telegrams and Morse code have been essential in the realm of communications, especially in its role in the military, where fighter pilots were required to memorize Morse code until the 1990s.

Your job is to create a translator that will take in messages encode it in morse, and output the result in alphabet form.

Input

You will receive a message, encoded in morse, whose dashes are represented by -, and dots represented by . Assume all letters will be uppercase. Each word will be separated via /, and each character will be separated by a space.

Output

Print out the complete translated statement.

ExampleInput
- .. - .- -. .. -.-. / - --- / .- -. -.-- / ... .... .. .--. / -.-. --.- -.. / -.-. --.- -.. / ... --- ... / .-. . --.- ..- .. .-. . / .. -- -- . -.. .. .- - . / .- ... ... .. ... - .- -. -.-. . / -.-. --- -- . / .- - / --- -. -.-. . / .-- . / ... - .-. ..- -.-. -.- / .- -. / .. -.-. . -... ..- .-. --.
Output
TITANIC TO ANY SHIP CQD CQD SOS REQUIRE IMMEDIATE ASSISTANCE COME AT ONCE WE STRUCK AN ICEBURG

加入题单

算法标签: