Sonji bought a combination lock that opens with a four-digit number created using the digits 0 through 9. The same digit cannot be used more than once in the combination.

If Sonji wants the last digit to be a 7 and the order of the digits matters, how many ways can the remaining digits be chosen?