#C8082. String Compression
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.
## sampleaaabccddd
a3b1c2d3