Translate the following inference to logic notation: If William were a nurse, then Jessica is making tea. Richard is not cooking. If Jessica makes tea, then Richard is cooking. If Richard cooks, then William is a nurse. Therefore Jessica is not making tea.
p -> q. ~r. q -> r. r -> p. Therefore ~q.