import java.util.HashSet;
import java.util.*; 
import java.util.Scanner;
import java.util.Set;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.text.DecimalFormat;
import java.lang.Math;
import java.util.Iterator; 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ArrayList<String> A = new ArrayList<String>();
		Set<String> AA = new HashSet<String>();
		for(int i = 2; i < s.length()-5; i++){
		    if(s.charAt(i)=='-' && (i+3) < (s.length()-1) && s.charAt(i+3)=='-'&& s.charAt(i-1)!='-' && s.charAt(i+1)!='-'){
		        A.add(s.substring(i-2, i+8));
		        AA.add(s.substring(i-2, i+8));
		    }
		}
		int max = -1;
		String ans = "";
		Iterator itr = AA.iterator();
		while(itr.hasNext()){
		    int count = 0;
		    String x = (String)itr.next();
		    for(int i = 0;i < A.size(); i++){
		        if(A.get(i).equals(x)){
		            count++;
		        }
		    }
		    if(count > max || max == -1){
		        max = count;
		        ans = x;
		    }
		}
		System.out.println(ans);
	}
}