the first max repeated substring