Repeating group in a RG using a join database

Hi - I have two databases - one with a list of terms and one with relationships between those terms.

I want to have a repeating group with a list of the terms on one side so it is not repeated and then a RG with the list of relational matches.

so if DB Terms is
A
B
C
D
E
F
G

and DB Relationships
B-C
B-C
B-G
I-H
I-J
I-C

so we would have only the middle B and I repeated and then the ones it’s linked with would be listed along side it?
B - C, G
I - H , J, C

Use split by(-) and item #