'Chi' has no antecedent and means 'whoever/those who'. 'Dove' is for places. 'In cui' is for time. 'Che' and 'cui' (with preposition) cover all other cases.
Relative Pronouns with Past Tense — Part 21 / 10
Il professore ___ ci ha insegnato storia era molto appassionato.