The experiment can be represented by a uniformly distributed sample space of outcomes $$\rm\{HHH, HHT, HTH, HTT, THH, THT, TTH, TTT\}$$
Of which we are considering the events:
$A = {\rm\{HHH, HHT, HTH, HTT\}}
\\ B= {\rm\{HTH, HTT, TTH, TTT\}} \\\quad A\cap B={\{HTH,HTT\}}
\\ C={\rm \{HHH\}} \\ \quad A\cap C=\{\} \\ \quad B\cap C=\{\}
\\ D={\rm \{HTT, THT, TTH, TTT\}} \\ \quad A\cap D={\rm \{HTT\}} \\ \quad B\cap D={\rm\{HTT, TTH, TTT\}} \\ \qquad A\cap B\cap D ={\rm\{HTT\}} \\ \quad C\cap D = \{\}$
So only the events $A$ and $B$ are pairwise independent.
However, the events $A,B,D$ are triowise independent, as $\mathsf P(A\cap B\cap D)=\mathsf P(A)\mathsf P(B)\mathsf P(D)$, although they are not mutually independent. (We could also say $A\cap B$ and $D$ are pairwise independent.)