var Main = function(input){
    input = input.split('\n');
    var i = 0;
    while(input[i] != '0'){
        console.log('Case ' + (i + 1) + ': ' + input[i++]);
    }
};
  
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));