Nesting

exactly the same code as in Brackets.pl