import java.util.*;
import java.io.*;
class Fs
{
public static HashMap
<String, Character
> reverse_alphabet
= new HashMap
<String, Character
>();
alphabet.put('A', ".-");
alphabet.put('B', "-...");
alphabet.put('C', "-.-.");
alphabet.put('D', "-..");
alphabet.put('E', ".");
alphabet.put('F', "..-.");
alphabet.put('G', "--.");
alphabet.put('H', "....");
alphabet.put('I', "..");
alphabet.put('J', ".---");
alphabet.put('K', "-.-");
alphabet.put('L', ".-..");
alphabet.put('M', "--");
alphabet.put('N', "-.");
alphabet.put('O', "---");
alphabet.put('P', ".--.");
alphabet.put('Q', "--.-");
alphabet.put('R', ".-.");
alphabet.put('S', "...");
alphabet.put('T', "-");
alphabet.put('U', "..-");
alphabet.put('V', "...-");
alphabet.put('W', ".--");
alphabet.put('X', "-..-");
alphabet.put('Y', "-.--");
alphabet.put('Z', "--..");
alphabet.put('_', "..--");
alphabet.put(',', ".-.-");
alphabet.put('.', "---.");
alphabet.put('?', "----");
reverse_alphabet.put(alphabet.get(c), c);
}
while(br.ready()) {
one(line);
}
}
public static void one
(String line
) { char[] cr = line.toCharArray();
//int[] lengths = new int[line.length()];
ArrayList<Integer> lengths = new ArrayList<Integer>();
for (int i = 0; i < cr.length; i++) {
converted[i] = alphabet.get(cr[i]);
converted_line = converted_line + converted[i];
lengths.add(converted[i].length());
}
int position = 0;
code = converted_line.substring(position, position + i);
position = position + i;
//System.out.print(code+" ");
System.
out.
print(reverse_alphabet.
get(code
)); }
}
}