Need help with Objects :(

I have 2 movie clips with a linkage. In a process both mc’s are being attached lots of times and a new name is given to each every time.

I want to make it so that is these 2 mc’s hits each other they dissappear, but i can’t do that because they all have different names and i don’t know how to call to them.