#C8082. String Compression

    ID: 52025 Type: Default 1000ms 256MiB

String Compression

String Compression

Given a string \( s \) consisting of only letters, compress it by replacing each maximal substring of consecutive identical characters with the character followed by the number of repetitions. For example, the string "aaabccddd" is compressed to "a3b1c2d3".

If the compressed string is not strictly shorter than the original (i.e. if \(|compressed| \geq |s|\)), then output the original string.

inputFormat

The input consists of a single line containing the string \( s \). The string may contain only uppercase and lowercase letters.

outputFormat

Output the compressed string if its length is shorter than the original string; otherwise, output the original string.

## sample
aaabccddd
a3b1c2d3