Run-Length Encoding
Compress a string by replacing each run of the same character with the character followed by the run length. aaabccdddd becomes a3b1c2d4.
Input
One string of lowercase letters.
Output
The encoded string.
Constraints
1 to letters.
Sample 1
Input
aaabccdddd
Output
a3b1c2d4
Sample 2
Input
abc
Output
a1b1c1