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