Function to add edges
function addedge ( a , b ) { if ( tree . get ( a ) == null ) tree . set ( a , [ ] ) ; tree . get ( a ) . push ( b ) ; if ( tree . get ( b ) == null ) tree . set ( b , [ ] ) ; tree . get ( b ) . push ( a ) ; } function FindCenter ( n ) {