Task to generate all lists matching some conditions