Distribution of students to scientific departments