CCCPaste
#include 
#include 
int count, now, n, m;
char in[101];

void findBlock(){
	for(int i=0;im-1?now=m-1:now=i+1);
			count++;
			return;
		}
	}
	now = 101;
}

int main(){
	int tc;
	scanf("%d",&tc);
	for(int i=1;i<=tc;i++){
		count = 0, now = 101;
		scanf("%d %d",&n,&m);
		scanf("%s",in);
		findBlock();
		for(int j=1;jm-1?now:now++);
				if(in[now]=='/')(now-1<0?now:now--);
			}
			scanf("%s", in);
			if(in[now]=='.' || now == 101){
				findBlock();
			}
		}
		printf("Case #%d: %d\n",i,count);
	}
	return 0;
}