I was about to give up my effort to solve a problem __________ a good idea struck me. 
#30835
A
when
B
while
C
until
D
before