S=list(input()) if S.count(S[0])==1: print("0 "+S[0]) else: for i in range(len(S)-1): if S.count(S[1+i])==1: print(str(2+i),S[1+i])