Choose the correct sentence which is built from the words and phrases given:
I / arrived / the / at / station / train / the / had / left / when /.
A. When I had arrived at the station the train left.
B. When at the station I arrived the train had left.
C. When arrived I at the station the train had left.
D. When I arrived at the station the train had left.