if (!preg_match('#^/ettevote/filter/abc/([a-ü]+)$#ui', $_SERVER['REQUEST_URI'], $code)) {
die('Not found!2');
}
$code = $code[1];
while index < len(array) - 1: index += 1
s = input()
i = 0
count = 1
out = ''
while i < (len(s) - 1):
if s[i] == s[i+1]:
count += 1
else:
out = out + s[i] + str(count)
count = 1
i += 1
print(out + s[i] + str(count)