In a sequence of events, the total possible number of ways all events can performed is the product of the possible number of ways each individual event can be performed. Since there are 10 openings
P = 40 x 39 x 38 x 37 x 36 x 35 x 34 x 33 x 32 x 31 = 3.07599 x 10^15 different combinations