There are N cities connected through bidirectional roads and this network forms an tree. The country is very vulnerable to terrorist attacks which is very alarming. The defense sector was notified of a terrorist attack and now they want to protect cities by sending their troops since it has been too late they can't send troops to every city.
The defense sector and terrorists will make a move alternately and the defense sector will go first.
After all the cities have been selected an explosion will take place in which all the cities containing bomb and any city which has road to bomb containing city will be deteriorated. If any city exists which didn't deteriorate, the country is SAFE else UNSAFE.
Note that terrorists wants country to be unsafe while defence sector wants country to be safe so they place troops and bombs optimally.
Input:
Output format
Print T lines. For each test case:
Constraints
TEST CASE 1: No matter where troops are placed they will always be adjacent to the bomb.
TEST CASE 2: If troops are sent to second city, If bomb is placed at first then troops at 3 and city 3 will be safe else if bomb is placed at 3 troops at1 and city 1 is safe. So regardless of where we place bomb country will be SAFE.