Switch order - generate all B anthen A