Rule reminder
'a cui' is the neutral, everyday form. 'al quale / alla quale / ai quali / alle quali' is the formal equivalent; the article agrees with the antecedent noun in gender and number. In long or complex sentences, 'al quale' is preferred to avoid ambiguity.
Lo studente ___ ho consegnato il tema era molto nervoso.