import java.util.*;

public class Rom2 {

/*This program converses morse code to letter.
* For example by typing .-- it should find the letter A,
* When it being done directly without using Scanner - it works,
* As I connecting Scanner method, it fails.
*/
public static void main(String[] args) {

Scanner keyboard = new Scanner(System.in);

char[] letter = { 'A', 'B', 'C' };
String[] morse = { ".-", "-...", "-.-." };

String input = keyboard.next();
keyboard.close();

String[] inputToStringArray = { input };

for (int i = 0; i < inputToStringArray.length; i++) {
for (int j = 0; j < morse.length; j++) {
if (inputToStringArray[i] == morse[j]) {

System.out.print(letter[j]);
}
}
}
}
}