12. $A_{i}(i=1,2,3,4)$ are subsets of the set $S=\{1,2,3, \cdots 2002 \mid$ , $F$ is the set of all quadruples $\left(A_{1}, A_{2}, A_{3}, A_{4}\right)$ , then $\sum_{\left(A_{1}, A_{2}, A_{3}, A_{4}\right) \in \mathbf{F}}\left|A_{1} \cup A_{2} \cup A_{3} \cup A_{4}\right|$ is $\qquad$ . ( $|x|$ is the number of elements in set $\times$ ).
12. $2^{80005} \times 15015$

For any $k \in S=\{1,2,3 \cdots, 2002\}$, if $k \notin A_{1} \cup A_{2} \cup A_{3} \cup A_{4}$, then $k \notin A_{i}$ $(i=1,2,3,4)$.

The subsets $A_{i}(1 \leqslant i \leqslant 4)$ of $S \backslash\{k\}(S \backslash \mid k\}$ (which represents the set $S$ excluding the element $k$) each have $2^{2001}$, resulting in $2^{2001 \times 4}$ quadruples $\left(A_{1}, A_{2}, A_{3}, A_{4}\right)$. The subsets $A_{i}(1 \leqslant i \leqslant 4)$ of $S$ each have $2^{2002}$, resulting in $2^{2002 \times 4}$ quadruples $\left(A_{1}, A_{2}, A_{3}, A_{4}\right)$. Therefore, there are $2^{2002 \times 4}-2^{2001 \times 4}$ quadruples $\left(A_{1}, A_{2}, A_{3}, A_{4}\right)$ such that $k \in A_{1} \cup A_{2} \cup A_{3} \cup A_{4}$, meaning each element $k$ is counted $2^{2002 \times 4}-2^{2001 \times 4}$ times, hence
$$
\begin{array}{l}
\sum_{\left(A_{1}, A_{2}, A_{3}, A_{4} \in F\right.}\left|A_{1} \cup A_{2} \cup A_{3} \cup A_{4}\right|=2002\left(2^{2002 \times 4} \cdot 2^{20101 \times 4}\right)=2^{8004} \times 2002 \times \\
\left(2^{4}-1\right)=2^{8005} \times 15015
\end{array}
$$