from collections import defaultdict S=input() D=defaultdict(int) for s in S: D[s]+=1 for s in D: if D[s]==1: print(S.index(s)+1,s)