19. (14 points) Suppose there are 2009 people standing in a row, and they start counting from the first person, 1 to 3. Anyone who counts to 3 will leave the row, and the rest will move forward to form a new row. This process continues until only 3 people remain after the $p$-th round of counting. What were the initial positions of the last 3 people?

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。
19. After the $p$-th round of counting, the first two people among the remaining 3 are obviously the first and second positions in the original queue.

Let the initial position of the third person be $a_{p+1}$. Then after the first round of counting, he stands at the $a_{p}$ position, $\cdots \cdots$ after the $p$-th round of counting, he stands at the $a_{1}$ position. Clearly, $a_{1}=3$.

Since $a_{p+1}, a_{p}, \cdots$ have not been eliminated, these numbers are not multiples of 3.

In fact, after one round of counting, the number of position changes from $a_{p+1}$ to $a_{p}$, $a_{p+1}-a_{p}$, is the number of multiples of 3 from 1 to $a_{p+1}$, i.e.,
$$
\frac{1}{3}\left(a_{p+1}-r\right)(r=1 \text { or } 2) \text {. }
$$

Therefore, $a_{p+1}-a_{p}=\frac{1}{3}\left(a_{p+1}-r\right)$,
$$
a_{p+1}=\frac{1}{2}\left(3 a_{p}-r\right)(r=1 \text { or } 2) \text {. }
$$

Since $a_{p+1}$ and $a_{p}$ are positive integers, then
when $a_{p}$ is odd, $r=1$;
when $a_{p}$ is even, $r=2$.
Thus, $a_{p+1}=\frac{1}{2}\left(3 a_{p}-r\right) \leqslant 20092009$ until
$$
\begin{array}{l}
a_{2}=\frac{1}{2}(3 \times 3-1)=4, \\
a_{3}=\frac{1}{2}(3 \times 4-2)=5, \\
\cdots \cdots \\
a_{18}=\frac{1}{2}(3 \times 1067-1)=1600, \\
a_{19}=\frac{1}{2}(3 \times 1600-2)=2399>2009 .
\end{array}
$$

Therefore, the last three people initially stood at the
first, second, and 1600th positions in the queue.