After compiling i am getting the right answer but the test case is not passing, please check

code is correct
only mistake is while printing
Dulpicate you have given a space at starting

Modified Code

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning: