Obtaining node uuid and parent uuid

Hi all,
I'm using neomodel and I have the following models:

class ForumElement(StructuredNode):
    uid = UniqueIdProperty()
    created_at = DateTimeProperty(default=dt.datetime.utcnow())
    text = StringProperty()
    is_visible = BooleanProperty(default=True)

    picture = Relationship(Picture, 'HAS_PICTURE')
    author = Relationship(User, 'HAS_USER')


class Post(ForumElement):
    title = StringProperty(default="")
    latitude = FloatProperty()
    longitude = FloatProperty()

    tags = Relationship(Tag, 'HAS_TAGS')


class Comment(ForumElement):
    parent = Relationship(ForumElement, 'HAS_PARENT')

With that code I have in the database something like the following, where in blue we have "comments" and in pink we have "post".
Screenshot from 2022-04-04 01-25-42

Now, I would like to have as result of a query a list of couple <parent.uid, childen.uid>, how could I obtain that? Notice that the parent of a Comment could be a Post or another Comment

The following should work:

match(child:Comment)-[:HAS_PARENT]->(parent)
where parent:Comment or parent:Post
return [parent.uid, child.uid]

If you only have comment and post nodes with the has_parent relationship, you could simplify it as follows:

match(child:)-[:HAS_PARENT]->(parent)
return [parent.uid, child.uid]