let to_chr_lists t = let eq (s1,_,_) (s2,_,_) = s1 = s2 in let ll = npartition_exn ~eq t in let ll = List.map ~f:(fun l -> let x, _, _ = List.hd_exn l in x, List.map ~f:(fun (_,b,c) -> b,c) l) ll in ll