Assign only odd numbers to the six different coins, so if two coins have no gap then they will produce an even number and you can detect it and work out as it has been generated.

Cheers

Al.