public class Solution {
    public static void main(String[] args) throws Exception {
       Scanner scan = new Scanner(System.in);
	        ArrayList <String> strings = new ArrayList<String>();
	            strings.add(scan.nextLine());
		        strings.add(scan.nextLine());
		        strings.add(scan.nextLine());
		        strings.add(scan.nextLine());
		        strings.add(scan.nextLine());

		        int min = 0;

		        for (int i = 0; i < strings.size()-1; i++) {
		            if (strings.get(i).length() > strings.get(i+1).length()) {
		            	min = i+1;
		            }
		        }

		        for (int i = 0; i < strings.size(); i++) {
		        	if (strings.get(i).length() == strings.get(min).length()) {
		        		System.out.println(strings.get(i));
		        	}
		        }
	    }
	}