from collections import Counter S=input() LEN=len(S) C=Counter(S) ANS=LEN ind=-1 for a in C: x=C[a] if ANS>LEN-x: ANS=LEN-x ind=[a] x=LEN for t in range(2,LEN): if x%t==0: while x%t==0: x//=t dis=LEN//t score=0 L=[] for i in range(dis): C=Counter() for j in range(t): C[S[j*dis+i]]+=1 MAX=0 indm="" for c in C: if MAX