Company: Flipkart_13july
Difficulty: medium
Super Tunnel Maintenance Problem Description Tunnels are an important part of the rail network in the country particularly in hill ranges. The Chief Engineer of the Railways has released a tender for maintenance of 'super tunnels' in the Garhwal hills. Super tunnels are those tunnels which, if they collapse or become dysfunctional, the areas that are connected through that tunnel will become unreachable. A map of all tunnels, including the super tunnels, is given with the tender. Your company is bidding for the project and your finance team has given you the cost of maintaining each tunnel separately. Your task is to figure out which tunnels are the super tunnels, and what will be your total project cost. Write a program that can help you identify the super tunnels, and print the project cost as the output. Read the Input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output and testcases will fail.