Question 129
Let $M$ be a set with $n$ elements. Determine the number of ways to select three subsets $A, B, C$ of $M$ so that
$$
\begin{gathered}
A \cap B \neq \emptyset, \quad B \cap C \neq \emptyset, \quad C \cap A \neq \emptyset \\
A \cap B \cap C=\emptyset
\end{gathered}
$$
$$
\begin{gathered}
A \cap B \neq \emptyset, \quad B \cap C \neq \emptyset, \quad C \cap A \neq \emptyset \\
A \cap B \cap C=\emptyset
\end{gathered}
$$