Distribution of students to departments