I was programming recently (as always), and stumbled upon something I have no idea how to do. I have a list which contains the numbers 0 through 9 in some random order. The list can be anywhere from 6 to 10 elements long. However, the number 0 is always first. I have 16 many different conditions in which I want the program to proceed but I don't want to check through all 9! permutations to find these conditions, especially given the nature of the program.

The winning condition(s) are as follows:

- One of the eight combinations of numbers must exist inside the list in any permutation of that combination
- Only one permutation of the combination needs to exist for the program to proceed
- The combination must be found
**entirely**on either the even elements, or the odd elements of the list - If the combination is found on the elements, return if it was found on the odds or evens
- Combinations: 123, 456, 789, 147, 258, 369, 159, 357 (note that 123 is 1, 2, and 3; not the number one-hundred twenty three)

Example:

0 5 3 4 1 8 2 - Go (123)

0 7 4 1 6 8 3 2 5 - Go (456)

0 5 2 1 9 4 7 8 6 3 - Do nothing

0 5 2 19 4 7 6 - Go (456)