CodeLab Academy 📞 9936 6696
← List Python · Level 6: Strings Code · 60 points ← #536 #538 →

#537. Compress a string

You are given a string of small letters. Write each run of the same letter as `letter+count` (example: aaabcc → a3b1c2). ### Input One line. ### Output The compressed string.

Examples

Input
aaabbbbbbbbbaaa
Output
a3b9a3
Input
ccbaaaac
Output
c2b1a4c1

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!