S = input() target = "" for s in set(S): if S.count(s) == 1: target = s break for i in range(len(S)): if S[i] == target: print(i + 1, target)