Work with random quantities of brackets