import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CC {
public static void main(String[] args) {
String s="asssse.rtets.ss.s.e";
String regex="^[a-z]+[a-z.]+[a-z]$";
Pattern p=Pattern.compile(regex);
Matcher m=p.matcher(s);
if(m.matches()){
System.out.println(m.group());
}
}
}