S = input() cnt0 = S.count(S[0]) if cnt0 == 1: print(1, S[0]) exit(0) for i in range(len(S)): if S[i] != S[0]: print(i + 1, S[i]) exit(0)