First, there are four people except A, B and C, a total of four! =24 kinds, then Party A, Party B and Party C still cut in line, because they are not adjacent, so each vacancy can only stand 1 person, a total of ***5 vacancies, 5*4*3=60 kinds, 24*60= 1440.
Since each box is not empty and the balls are the same, we put one in each box first. Then the problem becomes, put five identical balls into five boxes. There is no particularly good calculation method. Let's list them. (5,0,0), (4, 1, 0), (3,2,0), (3, 1, 1), (2,2, 1), where a number is repeated.
Hope to adopt, thank you.