You are given a card data string where the first two digits encode the length of the following field, which contains an Application ID (AID) or card number. Parse and validate the card information according to this length-prefixed encoding scheme. The problem is structured in multiple parts: Part 1 typically…