3. (Flowing Orchid) For $x \geqslant 1$, let $p(x)$ be the smallest prime number that does not divide $x$, and $q(x)$ be the product of all primes less than $p(x)$. Specifically, $p(1)=2$. If some $x$ makes $p(x)=2$, then define $q(x)=1$. The sequence $x_{0}, x_{1}, x_{2}, \cdots$ is defined by the following formula, with $x_{0}=1$.
$$
x_{n+1}=\frac{x_{n} p\left(x_{n}\right)}{q\left(x_{n}\right)},
$$

where $n \geqslant 0$. Find all integers $n$ such that $x_{n}=1995$.
Obviously, from the definitions of $p(x)$ and $q(x)$, it can be derived that for any $x$, $q(x)$ divides $x$. Therefore,
$$
x_{n=1}=\frac{x_{i}}{q\left(x_{x}\right)} \cdot p(x ;)
$$

Moreover, it is easy to prove by induction that for all $n$, $x_{n}$ has no square factors. Thus, a unique encoding can be assigned to $x$ based on whether it is divisible by a certain prime number, as follows: Let $p_{0}=2, p_{1}=3, p_{2}=5, \cdots$ be the sequence of all prime numbers in ascending order. Let $x>1$ be any square-free number, and let $p_{m}$ be the largest prime dividing $x$. Then the encoding of $x$ is $\left(1, s_{m-1}, s_{m-1}, \cdots, s_{1}, s_{0}\right)$, where $s_{i}=1$ if $p_{i}$ divides $x$, and $s_{i}=0$ otherwise, for $0 \leqslant i \leqslant m-1$. Define $f(x)=\frac{x p(x)}{q(x)}$. If the last digit of $x$'s encoding is 0, then $x$ is odd, $p(x)=2, q(x)=1, f(x)=2 x$, and the encoding of $f(x)$ is the same as that of $x$ except that the last 0 is replaced by 1. If the last several digits of $x$'s encoding are $011 \cdots 1$, then the last several digits of $f(x)$'s encoding are $100 \cdots 0$. If the encoding traverses all binary numbers, then the encoding of $f(x)$ can be obtained by adding 1 to the encoding of $x$. Given $x_{1}=2$ and for $n \geqslant 2$, $x_{n+1}=f\left(x_{n}\right)$, the encoding of $x_{n}$ can directly equal the binary representation of $n$. Therefore, when $x_{n}=1995=3 \cdot 5 \cdot 7 \cdot 19$, there exists a unique $n$, and since the encoding of $x_{n}$ is 10001110, it follows that $n=142$ is the decimal representation of this encoding.