s = input() cnt = {} for i in s: cnt[i] = cnt.get(i, 0) + 1 for i in cnt: if cnt[i] == 1: char = i print(s.index(char) + 1, char)