Runtime Error in "Matched Brackets" (ZCO12001)

why is this showing runtime error??Plz help.!
https://www.codechef.com/viewsolution/36125898
Problem code: ZCO12001

Change the array input to-
[int(x) for x in input().split()]
Now it shows WA instead of RE

The solution was not showing a RE. Changing array input don’t differ.