<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_type(self):
 """Return the type if it matches one of the cards."""

        for card, pattern in CARDS.items():
            if pattern.match(self.number):
                return card
        return None