import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        if (!sc.hasNextLine()) return;
        String s = sc.nextLine();
        
        boolean L1 = false;
        boolean f = false;
        
        String[] words = s.trim().split("\\s+");
        
        for (String w : words) {
            if (w.length() >= 2) {
                char[] c = w.toCharArray();
                if (c[0] == c[1]) {
                    System.out.println(w);
                    f = true;
                }
            }
        }
        
        if (!f) {
            L1 = true;
            System.out.println("L1 = " + L1);
        }
    }
}
