#K45672. Run-Length Encoding

    ID: 27806 Type: Default 1000ms 256MiB

Run-Length Encoding

Run-Length Encoding

Your task is to perform run-length encoding on an input string of lowercase letters. In run-length encoding, consecutive occurrences of the same character are replaced by the character followed by the count of repetitions. For instance, the string "aaabbbbcc" is encoded as "a3b4c2". The encoding follows the mathematical formula: \(s = c_1^{n_1} c_2^{n_2} \ldots c_k^{n_k}\), where \(c_i\) represents a character and \(n_i\) its frequency.

inputFormat

The input consists of a single line containing a string of lowercase letters. The string may be empty.

outputFormat

Output the run-length encoded version of the given input string.

## sample
aaabbbbcc
a3b4c2