#include #include #include #include #include #include #include #define ll long long using namespace std; const int maxn=1010, inf=1e9; int n, m, K, T; char s[233]; int st[(1<<10)+233], cnt[(1<<10)+233]; template inline void read(T &k) { int f=1; k=0; char c=getchar(); while(c<'0' || c>'9') c=='-'&&(f=-1), c=getchar(); while(c<='9' && c>='0') k=k*10+c-'0', c=getchar(); k*=f; } int main() { read(T); int cntt=0; while(T--) { cntt++; memset(st, 0, sizeof(st)); read(n); read(m); read(K); for(int i=1;i<=n;i++) { scanf("%s", s+1); for(int j=1;j<=m;j++) if(s[j]=='A') st[i]|=(1<<(j-1)); } int ans=0; for(int i=0;i<(1<=K*2) { ans++; break; } } } printf("Case #%d: %d\n", cntt, ans); } }