Game of Throne
题目描述
[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4449
[PDF](https://uva.onlinejudge.org/external/127/p12711.pdf)
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12711/d38adf6acff76551e5270a16c738f25ac97db452.png)
输入输出格式
输入格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12711/b030e0ee96bab2b4ffbfb6cba1faaa9b071420a4.png)
输出格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12711/6663ab7a7391cbcf1e509e635e6f15c6739e53b0.png)
输入输出样例
输入样例 #1
2
7 7 4
1 7 10
1 5 1
2 5 2
3 6 3
4 6 1
5 6 4
3 7 8
4 4 3
1 2 1
1 3 1
2 4 1
3 4 1
输出样例 #1
Case 1: 7
Case 2: Impossible