Script to find the card type and use it for numbering cards