Undirected tree
n = 5 ; NEW_LINE v [ 1 ] . append ( [ 2 , 2 ] ) ; NEW_LINE v [ 2 ] . append ( [ 1 , 2 ] ) ; NEW_LINE v [ 1 ] . append ( [ 3 , 5 ] ) ; NEW_LINE v [ 3 ] . append ( [ 1 , 5 ] ) ; NEW_LINE v [ 3 ] . append ( [ 4 , 3 ] ) ; NEW_LINE v [ 4 ] . append ( [ 3 , 4 ] ) ; NEW_LINE v [ 3 ] . append ( [ 5 , 1 ] ) ; NEW_LINE v [ 5 ] . append ( [ 3 , 1 ] ) ; NEW_LINE