407198: GYM102697 169 SOS
Description
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.
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.
OutputPrint out the complete translated statement.
ExampleInput- .. - .- -. .. -.-. / - --- / .- -. -.-- / ... .... .. .--. / -.-. --.- -.. / -.-. --.- -.. / ... --- ... / .-. . --.- ..- .. .-. . / .. -- -- . -.. .. .- - . / .- ... ... .. ... - .- -. -.-. . / -.-. --- -- . / .- - / --- -. -.-. . / .-- . / ... - .-. ..- -.-. -.- / .- -. / .. -.-. . -... ..- .-. --.Output
TITANIC TO ANY SHIP CQD CQD SOS REQUIRE IMMEDIATE ASSISTANCE COME AT ONCE WE STRUCK AN ICEBURG