Fill in the blanks using the past perfect form of the verbs given in brackets:
1. When I reached the station, the train ………… (leave) already.
2. By the time the teacher entered the class, the students …………. (stop) talking.
3. I would have failed, if I ………….. not (work) hard.
4. If I …………. (walk) fast, I would have won the race.