public class Solution {
    private static ArrayList<String> strings;

    public static void main(String[] args) throws Exception {
        strings =new ArrayList<String>();
        BufferedReader reader = new BufferedReader((new InputStreamReader(System.in)));
        int a=0;
        String b="";
        for(int i=0; i<5; i++){
            String s = reader.readLine();
            strings.add(s);
            if (strings.get(i).length()>a){
                b=strings.get(i);
            }
        }
        System.out.println(b);
    }
}