If the set number of both nodes is same , path length is odd else even
if ( setNum . get ( A ) == setNum . get ( B ) ) { System . out . println ( " Odd " ) ; } else { System . out . println ( " Even " ) ; } }