Brackets all over

i am unable to do this problem.
pls tell the correct code.

please read this Brackets all over conversation to get some idea about the problem and then try to code yourself.
try to write code yourself even if its partially correct, i will then help you to make it completely acceptable.

thanks

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.