Given a tree of nodes, print Graph Theory!
if it is possible to visit each node from every other node with less than or equal to nodes in between (inclusive of starting and ending nodes), and NO U
otherwise.
Input Specification
The first line will contain two integers, .
The next lines will each contain two integers, , meaning nodes and are connected. It is guaranteed the entire tree is connected.
Output Specification
Print Graph Theory!
if it is possible to visit each node from every other node with less than or equal to nodes in between (inclusive of starting and ending nodes), and NO U
otherwise.
Sample Input
5 4
1 3
2 3
5 4
4 3
Sample Output
Graph Theory!
Comments