@valnik,
it's not providing correct result, say for input 500, expected output is '500, 400, 300, 200, 100,90, 50, 40, 30, 20'. But it's showing
wherever there is multiple student going to a teacher, it's breaking