#別解5 from random import randint from collections import defaultdict from time import time S=input() N=len(S) D=defaultdict(int) BEGIN=time() while time()-BEGIN<0.70: i=randint(0,N-1) D[S[i]]+=1 alpha=min(D,key=lambda x:D[x]) print(S.index(alpha)+1,alpha)