instruction: Is the next sentence syntactically and semantically acceptable?

John did not like Mary.

response: acceptable

instruction: Is the next sentence syntactically and semantically acceptable?

A book was handed by Pat.

response: unacceptable

instruction: Is the next sentence syntactically and semantically acceptable?

It is Kim whom Sandy relies.

response: unacceptable

instruction: Is the next sentence syntactically and semantically acceptable?

Tom wanted to go home, but Peter didn't want to.

response:
acceptable