the Road Accident band plan unprecedented tour Treeland the RA fan look forward event make bet concert favorite group haveTreeland consist n city pair city connect bidirectional road overall country n1 road we know possible city the city number integer 1 n for city know value ri number people itWe know band travel path have concert city path the band path pass city twice time city have not previously visit thus musician travel path visit city twice necessarily city way concertsthe band plan gather big stadium concert hall tour time perform city population large population previously visit concert city in word sequence population city concert hold strictly increasingin recent interview leader road accident band promise fan band concert large possible number city thus band travel chain city Treeland concert city population number increase number concert large possiblethe fan Treeland frantically try figure concert group Treeland look like can not manage help real programmer help fan find seek number concert