# 题目重现

You may know that Bluegao University (formly Bluey University) is famous of networking technology. One day, their headmaster Yuege received a special router, along with a task about routing table.
In this problem, routing table is a (probably) big table with several items, each item represents a subnet. The router has limited function, it can only deal with two next-hops and one main routing table. Packets will be send to next hop A if there exists a subnet containing the destination of the packet in the main outing table. Otherwise they will be send to next hop B.
Yuege’s task is to invert the behaviour of his router, make all packets currently routed to hop A route to hop B, and vice versa. Also he wants to keep the size of the main routing table as small as possible, for performance.
In short, for a given routing table (i.e. a bunch of subnets), we need to get its “complement”, i.e. calculate a minimum set of subnets which have no intersection with given subnets, and their union must be the whole IPv4 address space.
Remember that Bluegao University is famous of networking tech, as headmaster of Bluegao University, Yuege definitely knows how to solve such problem, but he is too lazy to code, so he turns to you for help.

## Input

The first line of the input gives the number of test cases, T$T$. T$T$ test cases follow.
For each test case, the first line contains an integer n$n$ (0n30000$0 \le n \le 30000$), the number of subnets. Next n$n$ lines, each contains a subnet in the format of ‘a.b.c.d/l’, a,b,c,d,l$a, b, c, d, l$ are all integers, 0a,b,c,d256,0l32$0 \le a, b, c, d \le 256, 0 \le l \le 32$.
Note that even if l=32$l = 32$, the ‘/32’ part should not be omitted. And if l=0$l = 0$, the IP address part must be ‘0.0.0.0’.

## Output

For each test case, first output one line ‘Case #x:’, where x$x$ is the case number (starting from 1). Then on the second line print an integer n$n$ indicates the number of subnets in your answer. Next n$n$ lines each line contains a subnet in the same format as input. You may output them in any order.

## Sample Input

3
0
1
0.0.0.0/1
1
128.0.0.0/1

## Sample Output

Case #1:
1
0.0.0.0/0
Case #2:
1
128.0.0.0/1
Case #3:
1
0.0.0.0/1

# 题解

0.0.0.0/200
192.168.1.1/811000000

1. 遇到标记过的节点就返回
2. 遇到未标记过的节点有子节点为空则记录准备输出。

• 广告
• 抄袭
• 版权
• 政治
• 色情
• 无意义
• 其他

120