s = input() f = s[0] if f != s[1]: if s[1] == s[2]: print(1, f) else: print(2, s[1]) else: for i in range(len(s)): if s[i] != f: print(i+1, s[i])