#include #include using namespace std; struct{ int m,f; char c; }d[10010],tmp; int n,m,l,r; bool h[10010],k[10]; void out(int x){ if(x==-1)return; out(d[x].f); putchar(d[x].c); } int main() { int C=0; while (~scanf("%d%d",&n,&m)){ printf("Case %d: ",++C); memset(h,true,sizeof(h)); memset(k,true,sizeof(k)); l=r=0; for(int i=0;i