He _____ the letter before he went to bed last night. A. wrote B. has written C. had written D. will write