script to simulate making links between graph nodes, marking them, and seeing if they are connected