Combinations of only three kinds of elements