The harbor bell rings at the galleon yard of Masthead; Opal weighs the day's riddles manifests and starts the calculations. Task: Compress s using run-length encoding: replace each maximal run of equal characters c repeated k times by c followed by k. Input format: One line with a single lowercase string s. Output format: Print the encoded string. Constraints: 1 <= |s| <= 1368; s contains lowercase English letters.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= |s| <= 1368; s contains lowercase English letters.
