a = input("Input: ").lower()
def f(a):
b = []
count = 1
for i in range(1,len(a)):
if i == len(a)-1:
if a[i]!= a[i-1]:
b.extend([a[i-1],str(count),a[i],str(1)])
else:
count += 1
b.extend([a[i],str(count)])
elif a[i-1] == a[i]:
count += 1
continue
elif a[i] != a[i-1]:
b.extend([a[i-1],str(count)])
count = 1
print("".join(b))
f(a)