Run-length encoding, RLE in short, is replacing repeated patterns in a text by the number of repetitions plus the pattern that is repeated. This way, a text that contains many repetitions can be saved under a strongly shortened form. For this assignment we will keep it at the simple form of run-length encoding that applies the following rules:

Assignment

Write a function rle to which a string $$s$$ should be given as an argument. The function must print the coded form of the string $$s$$ as a result. This result is obtained by application of the simple run-length encoding scheme that was described in the introduction.

Example

>>> rle('AAAAAABCCCC')
'6A1B14C'
>>> rle('12344')
'11123124'