Create test1.txt

set different modes depending on distance between nodes with respect to particular node