Doubt in Matched Bracket

https://www.codechef.com/viewsolution/39312619
please point out the mistake