import java.util.*;
import java.lang.*;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Pattern pattern = Pattern.compile("(?<!(.)(?=\\1))([^raol1c])\\2(?!\\2)");
        System.out.println("hhh:");
        Matcher matcher = pattern.matcher("hhh");
        while (matcher.find()) {
          System.out.print("Start index: " + matcher.start());
          System.out.print(" End index: " + matcher.end() + " ");
          System.out.println(matcher.group());
        }
        System.out.println("hh:");
        matcher = pattern.matcher("hh");
        while (matcher.find()) {
          System.out.print("Start index: " + matcher.start());
          System.out.print(" End index: " + matcher.end() + " ");
          System.out.println(matcher.group());
        }
        System.out.println("ahh:");
        matcher = pattern.matcher("ahh");
        while (matcher.find()) {
          System.out.print("Start index: " + matcher.start());
          System.out.print(" End index: " + matcher.end() + " ");
          System.out.println(matcher.group());
        }
        System.out.println("hha:");
        matcher = pattern.matcher("hha");
        while (matcher.find()) {
          System.out.print("Start index: " + matcher.start());
          System.out.print(" End index: " + matcher.end() + " ");
          System.out.println(matcher.group());
        }
        System.out.println("ahhahhhahha:");
        matcher = pattern.matcher("ahhahhhahha");
        while (matcher.find()) {
          System.out.print("Start index: " + matcher.start());
          System.out.print(" End index: " + matcher.end() + " ");
          System.out.println(matcher.group());
        }
	}
}