http://acm.hdu.edu.cn/showproblem.php?pid=5222
Problem Description
Miceren likes exploration and he found a huge labyrinth underground!
This labyrinth has N caves and some tunnels connecting some pairs of caves.
There are two types of tunnel, one type of them can be passed in only one direction and the other can be passed in two directions. Tunnels will collapse immediately after Miceren passing them.
Now, Miceren wants to choose a cave as his start point and visit at least one other cave, finally get back to start point.
As his friend, you must help him to determine whether a start point satisfing his request exists.
Input
The first line contains a single integer T, indicating the number of test cases.
Each test case begins with three integers N, M1, M2, indicating the number of caves, the