def valid(passport: dict) -> bool:
    """Return true if all required fields are in passport."""
    required = set(["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"])
    return required.issubset(set(passport.keys()))