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