Example 23 (CMO-23 Test) Determine all triples $(p, q, n)$ that simultaneously satisfy
$$
q^{n+2} \equiv 3^{n+2}\left(\bmod p^{n}\right), p^{n+2} \equiv 3^{n+2}\left(\bmod q^{n}\right)
$$

where $p, q$ are odd primes, and $n$ is an integer greater than 1.
It is evident that $(3,3, n)(n=2,3, \cdots)$ are all arrays that meet the requirements. Suppose $(p, q, n)$ is another array that meets the requirements, then $p \neq q, p \neq 3, q \neq 3$. Without loss of generality, let $q > p \geqslant 5$.

If $n=2$, then $q^{2} \mid p^{4}-3^{4}$, which means $q^{2} \mid\left(p^{2}-3^{2}\right)\left(p^{2}+3^{2}\right)$. Since $q$ does not simultaneously divide $p^{2}-3^{2}$ and $p^{2}+3^{2}$, it follows that $q^{2} \mid p^{2}-3^{2}$ or $q^{2} \mid p^{2}+3^{2}$. But $03$ implies $q^{n} \leqslant p^{n+2}-3^{n+2}5$. From $p^{3} \mid q^{5}-3^{5}$, we know $p \mid q^{5}-3^{5}$. By Fermat's Little Theorem, $p \mid q^{p-1}-3^{p-1}$, thus $p \mid q^{(5, p-1)}-3^{(5, p-1)}$.
If $(5, p-1)=1$, then $p \mid q-3$. By
$$
\frac{q^{5}-3^{5}}{q-3}=q^{4}+q^{3} \cdot 3+q^{2} \cdot 3^{2}+q \cdot 3^{3}+3^{4} \equiv 5 \times 3^{4}(\bmod p),
$$

and $p>5$, we know $p$ does not divide $q^{5}-3^{5}$, thus $p^{3} \mid q-3$. From $q^{3} \mid p^{5}-3^{5}$, we know
$q^{3} \leqslant p^{5}-3^{5}p \geqslant 7$) and $q^{3} \mid p^{5}-3^{5}$, so $q^{3} \left\lvert\, \frac{p^{5}-3^{5}}{p-3}\right.$, hence
$$
q^{3} \leqslant \frac{p^{5}-3^{5}}{p-3}=p^{4}+p^{3} \cdot 3+p^{2} \cdot 3^{2}+p \cdot 3^{3}+3^{4} .
$$

By $5 \mid p-1$ and $5 \mid q-1$, we know $p \geqslant 11, q \geqslant 31$. Therefore
$$
q^{3} \leqslant p^{4}\left[1+\frac{3}{p}+\left(\frac{3}{p}\right)^{2}+\left(\frac{3}{p}\right)^{3}+\left(\frac{3}{p}\right)^{4}\right]\left(\frac{8}{11}\right)^{\frac{1}{4}} q^{\frac{3}{4}}$. Therefore
$$
\frac{p^{5}+q^{5}-3^{5}}{p^{3} q^{3}}<\frac{p^{2}}{q^{3}}+\frac{q^{2}}{p^{3}}<\frac{1}{q}+\left(\frac{11}{8}\right)^{\frac{3}{4}} \frac{1}{31^{\frac{1}{4}}}<1,
$$

which contradicts (1), i.e., $p^{3} q^{3} \mid p^{5}+q^{5}-3^{5}$.
In summary, $(3,3, n)(n=2,3, \cdots)$ are all the ternary arrays that meet the required conditions.