12. Place the nine digits $1,2, \cdots, 9$ into the nine small squares in Figure 4, so that the seven three-digit numbers $\overline{a b c} 、 \overline{d e f} 、 \overline{g h i} 、 \overline{a d g} 、 \overline{b e h} 、 \overline{c f i}$ and $\overline{a e i}$ are all divisible by 11. Find the maximum value of the three-digit number $\overline{c e g}$.
12. According to the problem, for modulo 11 we have
$$
\begin{array}{l}
a+c \equiv b, d+f \equiv e, g+i \equiv h, a+g \equiv d, \\
b+h \equiv e, c+i \equiv f, a+i \equiv e . \\
\text { Then }(a+c)+(d+f)+(g+i)+(b+h)+e \\
\equiv b+h+3 e \equiv 4 e(\bmod 11) .
\end{array}
$$

The left side of the above equation is
$$
1+2+\cdots+9=45 \equiv 1(\bmod 11) \text {. }
$$

So $4 e \equiv 1(\bmod 11), e=3$.
Thus, $d+f \equiv b+h \equiv a+i \equiv 3(\bmod 11)$.
Therefore, $\{d, f\} 、\{b, h\} 、\{a, i\}$ are permutations of $\{1,2\} 、\{6,8\}$ 、 $\{5,9\}$.
Hence, $\{c, g\}$ is $\{4,7\}$.
To maximize $\overline{c e g}$, we can take
$$
c=7, g=4 \text {. }
$$

Figure 8 is one valid arrangement that satisfies the problem.
Therefore, the maximum value of $\overline{c e g}$ is 734.