instruction: Is the next sentence syntactically and semantically acceptable?

Who did you ask whether Mary knows why John likes?

response: unacceptable

instruction: Is the next sentence syntactically and semantically acceptable?

John slipped in front of everyone who was there.

response: acceptable

instruction: Is the next sentence syntactically and semantically acceptable?

The architect selected a house for the couple.

response: acceptable

instruction: Is the next sentence syntactically and semantically acceptable?

The woman believed that the man who was here was ill.

response:
acceptable