单项选择题

(), they waved again and again to us.

A. When leaving
B. To leave
C. Being leaving
D. Having left