AThe boys who had not done their homework had been punished by their teacher.
BThe boys were punished by their teacher who had not done their homework.
CThe boys who had not done their homework were punished by the teacher.
DThe boys who had not done their homework were being punished by the teacher.