Wouldn't it be better to just earn garnets?

No attempts yetTime limit10sMemory limit128 MB

Problem

Suckzoo is a contestant on the game show The Zzinius. Today's episode plays a game called Stepping Stones, and the rules are these.

  1. A map shows NN islands and MM bridges, and every bridge can be crossed in both directions.
  2. Each bridge takes a fixed amount of time to cross.
  3. Every time a player crosses a bridge, that player receives the number of garnets attached to that bridge.
  4. Every player starts on island 1, and players are ranked 1st, 2nd, ... in the order they reach island NN.
  5. A route from island 1 to island NN always exists.
  6. No player may cross bridges in exactly the same order as another player.

A player may pass through the same island many times and cross the same bridge many times.

Suckzoo has secretly allied with Youngseok, another contestant on the show. Today Suckzoo hands 1st place to Youngseok and takes 2nd place himself. Arriving tied for 1st place also counts as 2nd place. Youngseok only wants 1st place and does not care about garnets, while Suckzoo wants as many garnets as possible, because one garnet is worth a million won in cash. The two of them choose their routes before any other player.

None of the remaining players may overtake Suckzoo. So take every bridge order that leads from island 1 to island NN and sort those orders by total crossing time. Two orders that cross different bridges take two separate places even when their total time is equal. Suckzoo arrives at the second time on that list, and among the bridge orders that finish at that time he picks one that pays the most garnets.

Find the time at which Suckzoo reaches island NN and the number of garnets he has collected by then.

Input

The first line has the number of test cases TT (1T201 \le T \le 20).

The first line of each test case has the number of islands NN (2N500002 \le N \le 50\,000) and the number of bridges MM (1M2000001 \le M \le 200\,000).

Each of the next MM lines has four integers xx, yy, tt, gg (1x,yN1 \le x, y \le N, 1t,g23111 \le t, g \le 2^{31} - 1). A bridge joins island xx and island yy, crossing that bridge takes time tt, and every crossing pays gg garnets. More than one bridge may join the same pair of islands.

The time and the garnet count you print fit in a signed 64-bit integer.

Output

For each test case, print one line in this format.

Game #i: Suckzoo ends game in time t, earning g garnet(s).

Here ii is the test case number starting at 1, tt is the time Suckzoo reaches island NN, and gg is the number of garnets he has collected by then.