Full threadvignesh_m·This is almost identical to the study of combinatorial species (https://en.wikipedia.org/wiki/Combinatorial_species)View on HN