A multi-part coding problem involving contact matching and consolidation using email domains. Input must be read from stdin. Part 1: Given a list of contacts (each with a name and one or more email addresses), match and consolidate contacts that share the same email domain. Contacts sharing a domain should…