Each test contains multiple test cases. The first line contains the number of test cases(
). The description of the test cases follows.
The first line of each test case contains three integers(
), representing the number of nodes, the number of edges, and the starting node of the player, respectively.
The nextlines each contain two integers
(
), representing an undirected edge connecting nodes
and
. It is guaranteed that there is no multiple edges or self-loops.
It is guaranteed that the sum ofover all test cases does not exceed
, and the sum of
over all test cases does not exceed
.
For each test case, if the player can achieve the game’s goal, output “Vegetable fallleaves” on the first line, and on the second line, output the minimum number of moves required to achieve the goal. Otherwise, output “Boring Game” in a single line.
In sample case 2:Initially, the player is at point, and the box is at point
.
The player moves along. (
moves in this step.
moves in total.)
The player pulls the box to point. The player goes to point
. (
move in this step.
moves in total.)
The player moves along. (
moves in this step.
moves in total.)
The player pulls the box to point. The player goes to point
. (
move in this step.
moves in total.)
The player pulls the box to point. The player goes to point
. (
move in this step.
moves in total.)
The player moved throughedges in total and achieved the goal. So you output “Vegetable fallleaves” in the first line. As
can be shown to be the minimum moves required to achieve the goal, you output “8” in the second line.