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