There are several ways to line up four people.
There are four possibilities for the first place. After the first place is elected, the second place has three candidates and the third place has two candidates. Sequential formula
4×3×2× 1=24
There are 24 methods (exclusion).