a = input()
i = 0
b = 1
d = ''
j = 1
for i in a:
if a[i] == a[j]:
b +=1
j=j+1
else:
d=d+a[i]+str(b)
break
print(d)
Traceback (most recent call last):
File "C:/Users/****/Documents/test.py", line 7, in <module>
if a[i] == a[j]:
TypeError: string indices must be integers