1247. Light

1 1 1

1 1 1

1 1 1

0 0 1

0 1 1

1 1 1

Input
2
1 0 0
0 0 0
0 0 1
1 0 1
8 8 8
2 0 3
Output
case #0:
0 0 1
0 1 0
1 0 0
case #1:
0 1 0
0 1 1
1 0 0