Obedient string @test case fails

https://ide.codingblocks.com/s/50974

2 test case failed;

https://hack.codingblocks.com/contests/c/512/348

Hello
My all Test Cases are Failing !!
https://hack.codingblocks.com/app/contests/3060/506/problem (The Question)
https://ide.codingblocks.com/s/681777 (I have attempted the Question in Python)

I have run the code in Jupyter Notebook to find if any case is coming wrong but I have applied every possible combination of a and bb and nothing and the answer is correct accordingly in Jupyter Notebook.
Please if you could help me.
Thank You !