Changed printneighbor function