单项选择题

Hardly (he had) entered (the office) when he realized (that he had) (forgotten his) wallet.

A.he had
B.the office
C.that he had
D.forgotten his