You have to keep track of how many left brackets you've opened, and this number cannot be bounded in advance.