Tyle in the correct relative pronoun. Gender comes from ANTECEDENT, case comes from CLAUSE (Relativsatz.)