12. Let the equation about $x$ be $\left(3-3^{-|x-3|}\right)^{2}=3-\cos \theta$ with real roots, then the value of $\theta$ is ( ).
A. $\theta=k \pi(k \in \mathbf{Z})$
B. $\theta=(2 k+1) \pi(k \in \mathbf{Z})$
C. $\theta=k \pi+\frac{\pi}{2}(k \in \mathbf{Z})$
D. $\theta=(2 k+1) \pi+\frac{\pi}{2}(k \in \mathbf{Z})$
12. 33. $\because \quad 3-3^{-|x-3|} \geqslant 2, \therefore \quad\left(3-3^{-|x-3|}\right)^{2} \geqslant 4$, hence $3-\cos \theta \geqslant 4, \therefore \quad \cos \theta \leqslant-1$. Therefore, $\cos \theta=-1$, which implies $\theta=(2 k+1) \pi(k \in \mathbf{Z})$, so the answer is B.