There's a comma (,) at the end of "all". That comma separates "all" from the phrase "of which". That is, "of which" is not part of "all". "of which" can be deleted without changing the meaning of the sentence:There are six types of flamingos all, __________ have long legs, long necks, and beaks that curve sharply downward.
1. of them
3. of which
...flamingos all have long legs.... OK
...flamingos all, have long legs... Not Ok (The comma separates the subject ('flamingos all' from the verb ('have').
...flamingos all, of them have long legs... Not Ok. (The phrase "all of them" is a set phrase. But the comma separates the head of the phrase "all" from its object "of them". So, let's move the comma:
...flamingos, all of them, have long legs... OK (No comma)
The difference between "of them" and "of which" is this: "of which" functions as a modifier, whereas "of them" functions as an object. Objects are keepers (don't separate them from their heads and don't delete them), whereas modifiers can be separated from the words they modify and they can be deleted, just like "of which" in our example:
"There are six types of flamingos all, of which have long legs, long necks, and beaks that curve sharply downward."
All the best,
- For Teachers