Question

Write a function to compress the given string?

Login to Submit

Examples

Input: "bat"
Output: "b1a1t1"

Input: "peeeeeen"
Output: "p1e6n1"