Group consecutive variables quantified by the same quantifier when printing