Without being able to understand your code (see my comments), I can tell you where your problem is. If you read what a ConcurrentModificationException
actually is, you will get to the part where it explains
[...] if a thread modifies a collection directly while it is iterating over the collection with a fail-fast iterator, the iterator will throw this exception.
You are iterating with it3
and then calling it3.remove()
.