单项选择题

We got to the station only()that the train had just left.

A. learned   
B. to learn 
C. learning 
D. having learned