fn parse_rules(input: &str) -> HashMap<u32, HashSet<u32>>
Build the Rules lookup by adding each rule in turn.