import java.util.*; public class Main{ public static void main(String[]args){ Scanner sc=new Scanner(System.in); String input=sc.nextLine(); String new_input=" "+input; char[]str=new_input.toCharArray(); int start=0; int n=input.length(); int[] next=new int[n+1]; // 构建next数组 for(int i=2,j=0;i...