单项选择题

I first met Mary three years ago when we ______ in a middle school together.

A.have worked

B.had been working
C.were working

D.had worked