My code for MIRROR STAR PATTERN (PATTERN 5) is giving the right output but it is not running the testcases

This is the link to the code that I have written for solving the MIRROR STAR PATTERN question. It gives the right output but doesn’t get submitted. Please help!