One testcase not passing

why my code is not passing all test cases.


Make necessary modifications and explain the error

what if a character is repeated more than 9 times? for example in aaaaaaaaaaaabb, answer should be a12b2, but your answer is a<b2, do not store the answer print it while iterating the string itself.
Solution: