from collections import Counter s = input() for k, v in (Counter(s)).items(): if v == 1: print(k, s.index(k) + 1)