Jingling Dominoes

Domino tiles are pieces separated in two parts, each having a number of dot on its surface. Yet numerous games are devised with these simple tiles. One the most amusing of these games is domino spiral. Domino spiral is a game in which tiles are put beside each other near enough that toppling the first domino topples the second, and so on. Continuing his adventures, this time the great Amoo Ardal has constructed the longest domino spiral made ever. In fact he is going to improve his last reco in Guinness World Records. The spiral is made up of millions of tiles an will take minutes to complete. He has arranged a magnificent ceremony. Many guests are invited from all around the world and press will record the event. One of the most famous and popular music bands will play the Jingling Dominoes piece during the event. To coordinate the music with dominos, the music band asked Amoo Ardal for the accurate ending time of the spiral. (i.e. the time for the last tile to fall) Amoo is confused. As it took month to construct the spiral, he does not want to ruin his work for that purpose. So he asked you as a proficient programmer to do the job for him. Your are given the domino structure in form of a weighted graph where edge denote a series of continuous dominoes and the length of the edges indicate how much time it takes for them to fall. For the case of this problem you can assume that falling of dominoes takes place at constant pace. Also nodes of the graph show the places where domino lines fork. When a tile falls down, all the neighboring not-fallen dominoes will fall too. Do not make any other assumptions. Input In the first line of input there will be an integer T (T ≤ 20). T test sets follow. Each begins with three integers N, M and S (2 ≤ N ≤ 1000, M ≤ 4000000, 0 ≤ S < N), number of nodes, edges and the starting node respectively. Each of next M lines contain three integer ui, vi, ti (0 ≤ ui, vi < N, 0 < ti < 106) which are the endpoints of i-th continuous domin line and the time it takes to completely fall. It is guaranteed that each node has at least one edge and the starting node has exactly one edge. Output If the domino spiral does not complete at all print ‘Sorry Amoo, your domino does not complete!’ in a single line (Quotes for clarity). Otherwise print the time that the latest tile will fall rounded to two decimal digits after the decimal point. Sample Input 3 430 011 122 233 441 101 022

2/2 232 033 422 011 322 Sample Output 6.00 4.50 Sorry Amoo, your domino does not complete!