#P15159. [SWERC 2024] Ook? Ook!

[SWERC 2024] Ook? Ook!

题目描述

When Arthur Evans excavated Knossos, along with the famous Linear A and Linear B tablets, he also found evidence of a much earlier language, the Ook language, whose only letters are O and K.

As he was deciphering this language, he telegraphed to London lists of Ook words that he was gathering. At the time, the Morse language was different from the one you know, and letters had Pseudo-Morse translations different from the ones they have today. Unfortunately, he was so excited by this discovery that he forgot to include pauses between letters when telegraphing.

As the operator in London, you have received this message from sir Arthur: .-.-.-, and through a side-channel, you have learnt this sequence can represent two different Ook words: OK and KO. You have also received the sequence .-.-.-.-.-, and have learnt it means OOK.

You need to ask sir Arthur to translate a few more Ook words for you into English. Can your program send them as Pseudo-Morse over the wire? You are as excited as sir Arthur, so you forget pauses in what you send as well.

输入格式

The input consists of a single line. This line contains a single Ook word WW, which only contains letters O and K, followed by an end-of-line character.

输出格式

The output should contain a single string, the translation of WW in the pseudo-Morse language, without pauses.

OK
.-.-.-
KO
.-.-.-
OOK
.-.-.-.-.-

提示

Limits

  • 1W10001 \leq |W| \leq 1000.