Chat Plugin Loop running only one chat from hundreds?

Right, I have a very complex idea here with Chats, and I want to use it as a effectively as possible. I'll explain the idea and hopefully someone can help me make it work.

I am using the Chat Plugin and want my users to be able to talk to each other. I also understand that the Chat Plugin is all access, so those who see the certain chat on a certain page can all interact and talk to each other. Now this is where it gets complicated, and this is the best way to explain it:

Say I have 5 users, and they all can select 9 different letters out of
A / B / C / D / E / F / G / I / J.

User 1 selects: ABC
User 2 selects: DEF
User 3 selects: GHI
User 4 selects: JAB
User 5 Selects CDE

The users will be paired up based on if they chose one of the same letters out of their three.

-So User 1 will be paired with; User4 and User 5.
-User 2 will be paired with User 5 Only.
-User 3 will be paired with no one.
-User 4 will be paired with User 1 Only.
-User 5 will be paired with User 1 and 4.

Just because user 1 can be paired with user 4 and 5, doesn't mean that user 4 can be paired with user 5.

So from the 5 users, I want this to create separate chat ID's that connect everyone, so if people make similar choices, they will then be able to see that Chat ID.

So what I am trying to achieve is chat windows that connect people that have relevance due to choices they have chosen - is this possible - Or anything like this?

I hope you understand and I have made things clear.