The figure shows four types of synovial joint, drawn as diagrams. P has a round head of one bone fitting into a cup of another. Q has two bone ends that move like a door, in one plane. R has a ring of one bone that turns round a peg of another. S has two flat surfaces that slide over each other. Which row gives the types of P, Q, R and S in that order?