Bill was the greatest boy scout leader in America and became quite a star because he always organized the most wonderful scavenger hunts (the game where kids follow hints to find a certain route). Bill has now retired, but a nationwide vote quickly chose his successor, a man named George. George, however, does a poor job and wants to learn from Bill's routes. Unfortunately, Bill left his successor only a few notes.
Bill never wrote down a route in full. Instead, he left many small slips of paper, each showing two consecutive steps of a route. He then shuffled these slips and memorized his routes the way some people study for exams: reading the first step over and over and trying to recall the one that follows. This made a lot of sense, because each step always followed from the previous one.
George would like each route written out as one long sequence of all its steps in the correct order. Please help him by reconstructing the routes from the shuffled slips.
The first line contains the number of scenarios (routes). Each scenario describes one route; its first line gives the number of steps S (3≤S≤333) on the route. The next S−1 lines each contain one pair of consecutive steps of the route, separated by a single space. The name of each step is always a single string made of letters.
For each scenario, first print a line of the form Scenario #i:, where i is the scenario number starting from 1. Then print the S steps of the route in the correct order, one per line. Separate consecutive scenarios with a single blank line; do not print an extra blank line after the final scenario.