A jar contains 40 balls numbered through 40. Three balls are removed without being returned to the jar, and the numbers are written down in order. How many sequences of numbers are possible?