#include <stdio.h>
#include <string.h>

char input[1000], temp[1000];
char *morse[7] = {".--","-.","---","..","--..","--.-",".-."};

int get_morse(int idx){
	int i,a,b;
	for (i=0; i<7; i++){
		for (a=idx,b=0; ; a++,b++){
			if (morse[i][b]=='\0') return i;
			if (input[a]=='\0' || input[a] != morse[i][b]) break;
		}
	}
	return -1; // kode morse tidak ketemu!
}

char* translate(){
	int i,j,k;
	for (i=j=0; input[i]!='\0'; ){
		k = get_morse(i);
		if (k==-1) return "could not be translated";
		temp[j++] = 'A'+k;
		i += strlen(morse[k]);
	}
	temp[j] = '\0';
	return temp;
}

int main(){
	while (gets(input)){
		puts(translate());
	}
}

