Hello, do not multiply the messages to potentially have more chances of having answers
You have to show your progress before asking your question to have a better chance of getting an answer.
see the instructions in the following link
Here is a lead:
from your elements you get their geometries and then you check the mutual intersections between them (you will need a cross product)
Cordially
christian.stan