Getting wrong anwer

I applied catalan formula to solve this. I am getting the correct output for custom test cases but getting the wrong answer when the code is submitted. Please help me with this.