#K74127. String Compression

    ID: 34129 Type: Default 1000ms 256MiB

String Compression

String Compression

Given a string S consisting of lowercase English letters, compress the string by replacing each consecutive group of identical characters with the character followed by the count of that group. For example, the string "aabcccccaaa" is compressed to "a2b1c5a3".

If the length of the compressed string is not strictly less than the length of the original string, the original string should be returned.

In mathematical terms, if the original string has length \(n\) and the compressed string has length \(m\), then output the compressed string only if \(m < n\); otherwise, output \(S\).

inputFormat

The input consists of a single line containing the string S. The string is made up exclusively of lowercase English letters.

outputFormat

Output a single line: the compressed version of the string if its length is strictly less than the original string; otherwise, output the original string.

## sample
aabcccccaaa
a2b1c5a3