1 <- 2
1 <- 3
2 <- 3
2 <- 4
3 <- 4
each number represent the node id and each row represent the edge . I need to get the second level neighbor from each node with first level neighbor. So the output will be like this
1 <- 2 3 (3 4) (4)
2 <- 3 4 (4)
3 <- 4
Please help. thanks