单项选择题

John did not have to write the composition if he didn’t want to. It was ______.

A.imperative
B.optional
C.critical
D.unnecessary