function main(tmp) {
    var i=0;
    while(tmp[i]!=0){
        console.log("Case " + (i+1) + ": " + tmp[i]);
        i = i + 1;
    }
}
var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', function (line) {
  lines += line;
  if(line==0){
  	main(lines);
  	lines='';
  }
});
process.stdin.on('end', function () {
});