Lcs of 3 strings

Can you please tell me what is wrong with my code.

Your submission shows that all your test cases were passed.
So mark the doubt as resolved if it is so