11712 - Morse code   

Description

Morse code is a way to represent English letters (here we only consider capital letters). The code is composed of some long signals and some short signals. For convenience, we represent a long signal as '-' and represent a short signal as '*'. Then ‘/’ is used to serve as a blank that distinguishes each word that consists of several letters.

For example, ''NPSC GG'' is ''-* *--* *** -*-* / --* --*", where  “-*” = N and “*--*” = P, and the code for other letters is shown below. 

However, these long and short signals in the Morse code cannot be represented using gesture. A way to simulate the long and short signals is as follows:

  1. “===” represents a long signal. (hitting table for 3 times)
  2. “=” represents a short signal. (hitting table for 1 time)
  3. For a letter, “.” is used as a pause to separate signals.
  4. In a word, “…” is used as a pause to separate letters.
  5. “…….” is used to separate words (that is, to represent ‘/’ as mentioned above).

       

For example, “NPSC GG" can be encoded as follows:

P.S  the problem is from 2015 網際網路程式設計全國大賽

Input

There are two lines. The first line is an integer N, meaning the second line will give a string with length N, and this string is only composed of '=' and '.'.

.N <= 999.

.The output string begins and ends with a non-blank letter.

Output

Print the result after decoding

Following is a sample test case:

Input:

57
=.===...===.=.=.=...===.=.===.=...===.=.=...=...=.=.===.=

Output:

ABCDEF

 

Sample Input  Download

Sample Output  Download

Tags




Discuss