Company: Flipkart_20july
Difficulty: medium
Deepika's Flower Journey Problem Description It's friendship day! Deepika is keen to wish her friend Jyoti with a special bouquet of flowers which she knows Jyoti loves. This bouquet can only be made with a combination of some special flowers, and will be incomplete if even one of the flowers is missing. These flowers are sold in different shops. Deepika plans to visit these shops on her way from her home to Jyoti's office. Each shop sells only one kind of flower. Deepika doesn't want to waste time, so she needs to visit exactly one shop selling each kind of flower before reaching Jyoti's office. From her home to a flower shop next to Deepika's home, and one next to Jyoti's office, so she plans to visit those two anyways. Help Deepika by finding the shortest path to collect all the flowers and reach Jyoti's office, while visiting exactly one shop selling each kind of flower. You can assume that at least one such path always exists. Read the Input from STDIN and print the output to STDO