【Answer】Solution: According to the analysis, (1) if the first person is the madman, then the second person is the liar, and the third person is also the liar, which is a contradiction;
(2) if the second person is the madman, then the first person is the liar, and the third person is also the liar, which is a contradiction;
(3) if the third person is the madman, then the first person is the liar, and the second person is the priest, which is valid, so the third person is the madman.

Therefore, the answer is: 3.
2. (8 points) Xiao Ming met three people, one of whom is a priest, one is a liar, and one is a madman. The priest only tells the truth, the liar only tells lies, and the madman sometimes tells the truth and sometimes lies. The first one said: "I am the madman." The second one said: "You are talking nonsense, you are not the madman!" The third one said: "Stop it, I am the madman." So, among these three people, the $\qquad$th one is the madman.