12. The function $f(x)$ defined on $\mathbf{R}$. Its graph is symmetric about the line $x=1$, and it satisfies $f(6-x)=$ $f(x)$. When $x \in[-1,1]$, $f(x)=x^{2}-2 x$, and let $I_{k}=[4 k-1,4 k+3](k \in \mathbf{Z})$. If the graph of the function $y=\log _{a} x(a>0$ and $a \neq 1)$ intersects the graph of $f(x)\left(x \in I_{k}\right.$ and $\left.k \geqslant 1\right)$ at two distinct points, then the range of values for $a$ is $\qquad$.
12. With the help of image research, one should first analyze the graph of $f(x)$ on $I_{k}$, as shown in Figure 4-2.
The graph of $f(x)$ is symmetric about the line $x=1$, i.e., for $x \in \mathbf{R}$, $f(2-x) = f(x)$.
Also, $f(6-x) = f(x)$.
Therefore, $f(x) = f(2-x) = f[6-(2-x)] = f(x+4)$, which means $f(x)$ is a periodic function with a period of 4.

Since for $x \in [-1,1]$, $f(x) = x^2 - 2x$, and the graph of $f(x)$ is symmetric about $x=1$,
for $x \in [1,3]$, $f(x) = x^2 - 2x$.
Also, $f(x)$ is periodic with a period of 4.
Thus, the graph of $f(x)$ on $I_{k} = [4k-1, 4k+3]$ is obtained by shifting the graph on $x \in [-1,3]$ to the right by $4k$ units.
Let $g(x) = \log_a x$,
to ensure that the graphs of $f(x)$ and $g(x)$ intersect at two different points on $x \in I_{k}$, it is necessary and sufficient that:
when $a > 1$, $g(4k+3) \leq 2$; when $0 < a < 1$, $g(4k-1) \geq -2$.
That is, the range of $a$ is $[\sqrt{4k+3}, +\infty) \cup \left(0, \frac{1}{4k+1}\right)$, where $k \in \mathbf{Z}$ and $k \geq 1$.