as technology outside world advanced Gensokyo look toYasaka Kanako Symposium PostmysticismThis interactive problemunder direct supervision Kanako Moriya Shrine railway system Gensokyo finally finish GSKR Gensokyo Railways consist n station m bidirectional track connect the ith track length l_i 1le l_ile 106 due budget limit railway system connect track stationsthe value railway system define total length track the maximum minimum capacity railway system define maximum minimum value currently functional system span forestin brief span forest graph span forest connectivity give graphKanako simulator able process 2 m query the input simulator string s length m consist character 0 andor 1 the simulator assume ith track functional s_i 1 the device tell Kanako maximum capacity system simulate stateKanako wants know minimum capacity system track functional help simulatorThe structure railway system fix advance in word interactor adaptive