A tree is a very well-known data structure. A data structure is a tree if it is either empty (it has $0$ nodes), or it has one or more nodes connected by directed edges and satisfies all of the following conditions.
If there is an edge from node $u$ to node $v$, we call this edge an outgoing edge with respect to $u$ and an incoming edge with respect to $v$.
For example, some directed graphs satisfy all of these conditions and are trees, while others violate them and are not.
Given the edges, determine whether each graph is a tree.
The input consists of several test cases.
Each test case consists of several pairs of integers. Each pair $u$, $v$ means that there is an edge from node $u$ to node $v$, where both $u$ and $v$ are greater than $0$. Each test case ends with a pair of two $0$s.
The end of the input is marked by a pair of two negative integers.
For each test case, let $k$ be its case number (starting from $1$ and increasing by $1$). Print Case k is a tree. if the graph is a tree, or Case k is not a tree. otherwise.