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