The input consists of several test cases. Each case starts with a line containing three integers: The size of the chip N (1<=N<=40), and A and B (1<=A<=1000, 0<=A<=B) as described above. Each of the following N lines contains N characters describing the slots, one of `.', `/' or `C', as described above.
The last test case is followed by a line containing three zeros.