Clashing Exams recursive program