s=input() dic={} for i in range(len(s)): if s[i] in dic: dic[s[i]][0]+=1 else: dic[s[i]]=[1,i+1] for i in dic: if dic[i][0]==1: print(dic[i][1],i)