#include <stdio.h>
#include <string.h>
#define N 300
int i, k, l, kol, size, a[N];
char str[1000], ch, res[1000], temp[2], temp2[2];
int main()
{
	freopen ("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	i=0;
	kol=0;
	while(true)
	{
		ch = getchar();
		kol++;
		temp[0] = ch;
		temp[1] = '\0';
		temp2[0] = str[i];
		temp2[1] = '\0';
		if (strcmp(temp,temp2)) 
			kol++;
		else
		{
			printf("%s" , temp);
			printf("%d", kol);
			kol=0;
		}
		if (ch == '\n') break;
		str[i++]=ch;
	}
	str[i]='\0';
	return 0;
}