import java.util.*;

public class NoPause {
	String[] morse = new String[]{".--","-.","---","..","--..","--.-",".-."};

	public int getMorse(String prefix){
		for (int i=0; i<morse.length; i++)
			if (prefix.startsWith(morse[i])) return i;

		return -1; // kode morse tidak ketemu!
	}

	public String translate(String input){
		String temp = "";
		for (int i=0,j=0; i<input.length(); ){
			int k = getMorse(input.substring(i)); 
			if (k==-1) return "could not be translated";
			temp += (char) ('A'+k);
			i += morse[k].length();
		}
		return temp;
	}

	public void solve(){
		Scanner scan = new Scanner(System.in);
		while (scan.hasNextLine())
			System.out.println(translate(scan.nextLine()));
		scan.close();
	}

	public static void main(String[] args){
		new NoPause().solve();
	}
}
