from collections import Counter S = input() for k, v in Counter(S).items(): if v == 1: for i in range(len(S)): if S[i] == k: print(i+1, k)