there infrastructure n city number road connect city each roadsi ai bi indicate bidirectional road city ai biThe network rank different city define total number directly connect road city if road directly connect city count oncethe maximal network rank infrastructure maximum network rank pair different citiesGiven integer n array road return maximal network rank entire infrastructure Example 1input n 4 road 01031213output 4explanation the network rank city 0 1 4 4 road connect 0 1 the road 0 1 count onceExample 2input n 5 road 010312132324output 5explanation there 5 road connect city 1 2example 3input n 8 road 011223245657output 5explanation the network rank 2 5 5 notice city connect Constraints2 n 1000 roadslength n n 1 2roadsilength 20 ai bi n1ai biEach pair city road connect