Morse code

The morse code has been used extensively for communication. It was the first means of communication that could delegate complex messages over long distances. Now you are asked to encode a simple English sentence into a Morse code.
Symbols to Morse Code
  • 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 → __..
  • , → __..__
  • . → ._._._
  • ? → ..__..
  • ; → _._._.
  • : → ___...
  • ‘ → .____.
  • “ → ._.._.
  • ! → _._.__
  • ‘ ‘ → ' ' (space is also a space)
The input contains a single line - the phrase in English.
The program should print the corresponding Morse code. Each letter needs to be separated by a space. You can separate them with multiple spaces as well.
Input
Output
How are you?
.... ___ .__ ._ ._. . _.__ ___ .._ ..__..
tasty
_ ._ ... _ _.__
RUN!
._. .._ _. _._.__
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue