Solution to the card number validation problem.