Complete the sentences with the correct forms of the verbs in the brackets. Use the past perfect continuous.
1. I did not go out last night because I (work) all day.
2. When the musician became the director of the opera house, he (live) in this town for ten years.
3. The passengers (wait) for four hours before the ground staff could finally give them information on the delay of their flight.
4. She (learn) Spanish at school.