How to create 1:1 relationships between modules?

How to create 1:1 relationships between modules?

This is what we need:
Module A has a lookup field called "B", where one record of module B can be connected.

Module B has a lookup field called "A", where one record of module A can be connected.

Note: the fields should be in sync. If we connect a record of module B in module A, the record of module A should be visible in the lookup of module B.
 
How can we achieve that?