#include <stdio.h>
int main() {
int c, bc, count, flag;
bc = 0;
flag = 0;
while ((c
= getchar()) != -1 && c
!= '\n') { flag = 1;
if(c != bc) {
else printf("%c%d", bc
, count
+ 1); count = 0;
} else {
count++;
}
bc = c;
}
if (flag) {
else printf("%c%d", bc
, count
+ 1); } else {
}
}
/* end */
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICBpbnQgYywgYmMsIGNvdW50LCBmbGFnOwogIGJjID0gMDsKICBmbGFnID0gMDsKICB3aGlsZSAoKGMgPSBnZXRjaGFyKCkpICE9IC0xICYmIGMgIT0gJ1xuJykgewogICAgZmxhZyA9IDE7CiAgICBpZihjICE9IGJjKSB7CiAgICAgIGlmIChjb3VudCA9PSAwKSBwdXRjaGFyKGJjKTsKICAgICAgZWxzZSBwcmludGYoIiVjJWQiLCBiYywgY291bnQgKyAxKTsKICAgICAgY291bnQgPSAwOwogICAgfSBlbHNlIHsKICAgICAgY291bnQrKzsKICAgIH0KICAgIGJjID0gYzsKICB9CiAgaWYgKGZsYWcpIHsKICAgIGlmIChjb3VudCA9PSAwKSBwdXRjaGFyKGJjKTsKICAgIGVsc2UgcHJpbnRmKCIlYyVkIiwgYmMsIGNvdW50ICsgMSk7CiAgfSBlbHNlIHsKICAgIHByaW50ZigiMCIpOwogIH0KICBwdXRjaGFyKCdcbicpOwp9Ci8qIGVuZCAqLwo=