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2 1 1
2 2 1 1 1
1 2 2 2 1
2 1 2 2 2
0 1 2 2 0
0 0 0 0 0
2 1 1 0 1
1 2 2 1 1
11
1 2 1 0 1
0 2 1 1 2
1 0 0 1 1
2 2 0 0 1
1 0 0 2 2
1 2 1 2 0
1 1 0 0 2
2 0 1 2 2
1 2 2 1 1
1 1 1 2 1
2 1 0 0 0
8
1 2 1 2 1
1 1 0 0 2
2 2 2 2 1
1 1 0 0 2
1 2 1 1 2
0 1 1 1 2
0 0 0 1 0
1 2 2 1 0
8
1 0 1 1 1
1 0 2 0 0
2 2 0 1 2
1 0 0 0 2
0 2 0 1 2
2 1 2 0 1
2 2 2 2 0
1 2 2 1 2
8
1 0 2 1 0
0 2 1 0 2
2 0 0 0 1
0 0 2 2 0
1 2 1 0 2
0 1 1 1 1
1 2 1 2 1
2 0 0 1 2
9
1 2 1 0 2
2 2 2 1 1
2 1 1 2 1
1 2 1 0 2
1 2 1 1 0
1 1 1 2 2
0 1 0 2 0
0 0 0 0 0
1 2 0 0 1
8
2 2 0 0 1
2 1 2 2 1
0 0 0 1 1
0 2 1 1 0
0 2 2 1 1
1 0 0 0 2
2 1 2 2 1
1 1 2 0 0


output
Case #1
6
Case #2
4
Case #3
0
Case #4
-1
Case #5
8
Case #6
5
Case #7
5
Case #8
6
Case #9
10
Case #10
9
Case #11
3
Case #12
10
Case #13
9
Case #14
5
Case #15
8
Case #16
-1
Case #17
9
Case #18
8
Case #19
7
Case #20
7
Case #21
7
Case #22
7
Case #23
6
Case #24
5
Case #25
4
Case #26
5
Case #27
5
Case #28
9
Case #29
6
Case #30
5
Case #31
4
Case #32
6
Case #33
6
Case #34
6
Case #35
9
Case #36
10
Case #37
8
Case #38
8
Case #39
8
Case #40
5
Case #41
10
Case #42
8
Case #43
8
Case #44
6
Case #45
10
Case #46
7
Case #47
5
Case #48
6
Case #49
7
Case #50
7