[Mani] Changed return type (list or set) based on input parameter type